我有一条路线孩子这样的路线:
{
path: 'dashboard',
children: [{
path: '',
canActivate: [CanActivateAuthGuard],
component: DashboardComponent
}, {
path: 'wage-types',
component: WageTypesComponent
}]
}
Run Code Online (Sandbox Code Playgroud)
在浏览器中我想获得激活的父路线
host.com/dashboard/wage-types
Run Code Online (Sandbox Code Playgroud)
如何/dashboard
使用Angular 2而不是JavaScript,但我也可以接受JavaScript代码,但主要是Angular 2.