[Vuejs]-Vue nested routes not displaying their components and no errors

3👍

You have a typo in your routes – chilren instead of children.

You don’t need to specify full path in children routes. Correct way of doing:

export const routes = [
    { path: '', component: Home, name: 'Home'},
    { path: '/profile/:username', component: Profile, name: 'Profile', children: [
        { path: 'locations', component: Locations, name: 'Locations'},
        { path: 'map', component: Map, name: 'Map'}
    ]},
];

Leave a comment