Answer the question
In order to leave comments, you need to log in
Why does the child CanActivate fire before the root Resolver?
In general, there is such a configuration:
const appRoutes: Routes = [
{
path: '', component: BaseComponent, resolve: { data: PermissionResolver }, children: [
{
path: '', loadChildren: './area/Home/Home.module#HomeModule',
}
}
const homeRoutes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{
path: 'home', component: homeContainerComponent, children: [
{
path: 'add', component: AddContainerComponent, canActivate: [CanActivateAdd], children: [
{
path: '', component: AddComponent
}
]
}
],
}
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question