Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
@Injectable()
export class CanActivateGuard implements CanActivate {
constructor(
private aclService: AclService
) { }
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
const tags = route.data['acl'] as string[];
const result = tags && this.aclService.canAny(tags);
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment