0
父路由PARAMS我已經路線是這樣的:進去canActivate
[
{
path: ':orgName',
children: [
{
path: '',
component: HomeComponent
canActivate: [AuthGuard],
},
{
path: 'details',
component: DetailComponent
}
]
}
]
如何訪問ORGNAME內AuthGuard的canActivate?
我試圖
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
console.log(route.params["orgName"])
}
但它打印未定義
'的console.log(route.parent)' –