marcelo.delta
marcelo.delta

Reputation: 3082

How to work with child and dynamic routes?

Using Nuxt2, 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.

Upvotes: 0

Views: 355

Answers (1)

Boussadjra Brahim
Boussadjra Brahim

Reputation: 1

In Nuxt2, try to make the _id as directory and add its own index.vue :

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

Upvotes: 1

Related Questions