search

Home  >  Q&A  >  body text

Using Nuxt JS dynamic parameters on nested pages

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:

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

I tried the following folder tags:

How can I achieve this goal?

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

P粉595605759P粉595605759275 days ago411

reply all(1)I'll reply

  • P粉037215587

    P粉0372155872024-03-30 00:48:16

    Use [ ] syntax

    pages/landing/[paramName].vue

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

    reply
    0
  • Cancelreply