canActivateChild implementation (#2691)

This commit is contained in:
Cilibiu Bogdan
2017-11-22 12:07:27 +02:00
committed by Eugenio Romano
parent 4fbd9f5d62
commit 39737b3df6
2 changed files with 62 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ export class AuthGuardEcm implements CanActivate {
.catch(() => false);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> {
return this.canActivate(route, state);
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> {
return this.isLoggedIn().then(isLoggedIn => {