Home > Net >  How to work with child and dynamic routes with Nuxtjs?
How to work with child and dynamic routes with Nuxtjs?

Time:02-10

I'm building a structure that I need dynamic routes.

This makes it necessary for navigation with more information.

Route: /lab/1/lad/2

Inside the route(page) lab I have two files, index.vue and a _id.vue

Inside the side learning to do the same, but including only the _id.vue

pages
--| lab/
-----| index.vue
-----| _id.vue
-----| lad/
--------| _id.vue

Page not found.

Could anyone help with this question?

Much obliged.

CodePudding user response:

Try to make the _id as directory and add its own index.vue :

pages
--| lab/
-----| index.vue
-----| _id/
--------| index.vue
--------| lad/
-----------| _id.vue
  • Related