From 9a33892cec28771304fd5a175c4fe0974f57efb8 Mon Sep 17 00:00:00 2001 From: Kim-Lan <83447448+Kim-Lan@users.noreply.github.com> Date: Mon, 20 May 2024 15:19:34 -0700 Subject: [PATCH] docs: add example of passing params to `` (#27284) --- docs/3.api/1.components/4.nuxt-link.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/3.api/1.components/4.nuxt-link.md b/docs/3.api/1.components/4.nuxt-link.md index 5e54807145..b623d1ce5a 100644 --- a/docs/3.api/1.components/4.nuxt-link.md +++ b/docs/3.api/1.components/4.nuxt-link.md @@ -25,6 +25,22 @@ In this example, we use `` component to link to another page of the ap ``` +### Passing Params to Dynamic Routes + +In this example, we pass the `id` param to link to the route `~/pages/posts/[id].vue`. + +```vue [pages/index.vue] + +``` + +::tip +Check out the Pages panel in Nuxt DevTools to see the route name and the params it might take. +:: + ### Handling 404s When using `` for `/public` directory files or when pointing to a different app on the same domain, you should use the `external` prop.