I was trying to find any information on the lifecycle application initialization. There are few types of guards. I'm interested in following types:
- CanActivate
- CanLoad
- CanActivateChild
Suppose we have following route configuration:
{
path: '',
component: ParentA,
canActivate: [CanActivateGuard],
children: [
{
path: 'childA',
component: ChildA,
canActivateChild: [CanActiveChildGuard]
},
}
and Main Routing:
{
{
path: 'parent',
loadChildren: '@app/modules/parent.module#ParentModule',
canLoad: [CanLoad]
},
}
Now, when trying to open parent/childA
. Which guard will be executed first?
Will ParentA Component
be rendered before the CanActivateChildGuard check?