我只是问自己如何实现它,当我有1个路由,2个布局导致相同的组件?
这是我的路线:
{
path: '',
component: HomeLayoutComponent,
canActivate: [NoneUserGuard],
children: [
{ path: 'a', component: aComponent }
]
}, {
path: '',
component: LoginLayoutComponent,
canActivate: [UserAuthGuard],
children: [
{ path: 'a', component: aComponent }
]
},
{ path: '**', redirectTo: 'a' }