You _should_ be seeing a warning about this, but appearntly there's a problem with that. I will check that out.
The warning _does_ appear when you use e.g. the vue-cli webpack template and have run npm run dev
The warning would read:
Named Route 'home' has a default child route.
When navigating to this named route (:to="{name: 'home'"), the default child route will not be rendered.
Remove the name from this route and use the name of the default child route for named links instead.`
Which esseantially means your route config should look like this:
const router = new VueRouter({
routes: [
{ path: '/home', component: resolve => resolve(Home),
children: [
{ path: '', name: 'home', component: resolve => resolve(Welcome) },
{ path: 'welcome', name: 'welcome', component: resolve => resolve(Welcome) },
]
}
]
})
Sorry for the inconvenience, will see how to fix that the non-minified release does show the warning in the future, but it apüpears that warnings in this build are not shown generally.
Ok, i get it, thanks.
Am getting this error appeared on my app. Am using vue-router 2.6.0, is this fixed?
The error is telling you what to do, just follow the instructions.
Someone should put it into docs https://router.vuejs.org/en/essentials/nested-routes.html
Most helpful comment
You _should_ be seeing a warning about this, but appearntly there's a problem with that. I will check that out.
The warning _does_ appear when you use e.g. the vue-cli webpack template and have run
npm run devThe warning would read:
Which esseantially means your route config should look like this:
Sorry for the inconvenience, will see how to fix that the non-minified release does show the warning in the future, but it apüpears that warnings in this build are not shown generally.