canactivate (1) 썸네일형 리스트형 [angular] authGuard, canActivate, canActivateChild We can make the guard like this.@Injectable() =>this is for authServiceexport class AuthGuard implements CanActivate, CanActivateChild { constructor(private authService: AuthService, private router: Router) { } canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean { return this.authService.isAuthenticated() .then( (authenticated: boolean) => { if .. 이전 1 다음