Skip to content

Commit

Permalink
feat(@schematics/angular): add UrlTree to CanActivate method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
SIDENIS\Andrey.Chalkin authored and Keen Yee Liau committed Jan 11, 2019
1 parent 5064012 commit bf93f52
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
import { Observable } from 'rxjs';

@Injectable({
Expand All @@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
export class <%= classify(name) %>Guard implements CanActivate {
canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
return true;
}
}

0 comments on commit bf93f52

Please sign in to comment.