Skip to content

Instantly share code, notes, and snippets.

@dherges
Created April 7, 2017 05:54
Show Gist options
  • Save dherges/41cb286f6933c38e093b9ac52965391b to your computer and use it in GitHub Desktop.
Save dherges/41cb286f6933c38e093b9ac52965391b to your computer and use it in GitHub Desktop.
ng-router-functional
@Injectable()
export class FooGuard implements CanActivate {
canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
return Observable.of(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment