[Vuejs]-How to create child routes in vue js using Vue-Router and Laravel?

0👍

You must create children in object you want.
Like this
if you put path of father element to his children
this page will be open when page create

{
    path: '/home',
    component: Home,
    children: [
        {
            path: '/home',
            name: 'dashboard',
            component: () => import('./views/Dashboard.vue')
        },

        {
            path: 'candidate-profile',
            name: 'candidate-profile-index',
            component: () => import('./views/candidate/CandidateProfileIndex')
        },

        {
            path: '/candidate-profile/create',
            name: 'candidate-profile-create',
            component: () => import('./views/candidate/CandidateProfileCreate')
        },
    ],
},

Leave a comment