Created
April 26, 2018 19:25
-
-
Save sliceofbytes/8762b5a86ea7ece1e3c4f7bc8463939e to your computer and use it in GitHub Desktop.
Route from activate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean { | |
if (someCondition) { | |
this.router.navigate(['not-allowed']); | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment