Angular2 run Guard after another guard resolved
In my project I have two guards. AuthGuard and PermissionGuard. I need to first AuthGuard runs and when it resolved and if true the permissionGuard begins but now this guards are running parallel and permissionGuard not working well. the way I used for this issue is that I called the AuthGuard CanActivate method in Permission guard but I think there is a quite better way for doing this.
The best way I’ve seen it done is to expose the router guards on child routes. Here is a working example.
path:'', canActivate:[AuthorizationService2],component: HomeComponent