Using Nuxt JS dynamic parameters on nested pages
P粉595605759
P粉595605759 2024-03-29 13:20:47
0
1
375

I'm trying to create dynamic parameters for one of my nuxt JS pages and I'm trying to figure out the correct folder structure, I need a URL similar to:

  • https://example.com/landing/123

123 is the dynamic parameter I need to get using this.$route.

I tried the following folder tags:

  • pages/_landing/index.vue
  • pages/landing/_index.vue

How can I achieve this goal?

Even though my parameters are not provided, I still need to load the page

P粉595605759
P粉595605759

reply all(1)
P粉037215587

Use [ ] syntax

pages/landing/[paramName].vue

Further reading https://v3.nuxtjs.org/guide/directory-struct/page#dynamic routing

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template