I want to show child component in component with vue js, but I couldn't figure out how to do it. Could you help. When I click profile from the menu, "http://localhost:3000/admin/profile" logs in. When I click on the sub menus in the "ProfileDashboard", I want the child component to open. I think like accordion style.
const routes = [
{
path: '/',
component: DashboardLayout,
redirect: '/admin/overview'
},
{
path: '/admin',
component: DashboardLayout,
redirect: '/admin/overview',
children: [
{
path: 'overview',
name: 'Overview',
component: Overview
},
{
path: 'profil',
name: 'Profil',
component: ProfilDashboard,
children: [
{
path: 'siparisgecmisi',
name: 'siparisgecmisi',
component: Gecmis
}
]
}
]
},
{path: '*', component: NotFound}
]
export default routes
ProfilDashboard.vue
<router-link to="/admin/profil/siparisgecmisi" tag="li" class="list-group-item"><a>My order history</a></router-link>