Answer the question
In order to leave comments, you need to log in
How to properly nest routes in Vue2?
What is the right way to do nested childrent routes? The route navigates, but does not open the page (remains on the parent ). These nested routes worked until the children array was added (when they were separate
routes):
{
path: "/pokemon", name: "pokemon", component: pokemon,
children:[
{ path: ":name", name: 'name', component: pokemonDetail, props: true },
{ path: "type/:typeName", name: 'types', component: TypeDetail, props: true }
],
props: true,
meta: {
requireAuth: true
}
},
<router-link
id="info"
class="btn btn-warning link_to"
:to="{name: 'name', params: { name: pokData.name } }"
>Info</router-link
>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question