Angular canactivate and candeactivate in same guard
Answers
Answered by
0
Héy Héllø..
Here. Is your answer
So, Thé ÃnSwer is..: -- import { Injectable } from '@angular/core'; import { CanActivate } from '@angular/router'; import { AuthService } from './auth.service'; @Injectable() export class CanActivateViaAuthGuard implements CanActivate { constructor(private authService: AuthService) {} canActivate() { return this.authService.isLoggedIn(); } }
. #ThanKyOu
#please marks me as Brilliant...
. @RamSharma
Here. Is your answer
So, Thé ÃnSwer is..: -- import { Injectable } from '@angular/core'; import { CanActivate } from '@angular/router'; import { AuthService } from './auth.service'; @Injectable() export class CanActivateViaAuthGuard implements CanActivate { constructor(private authService: AuthService) {} canActivate() { return this.authService.isLoggedIn(); } }
. #ThanKyOu
#please marks me as Brilliant...
. @RamSharma
Answered by
0
Answer:
hope it help u........... mate
Attachments:
Similar questions