Skip to content

Commit bf93f52

Browse files
SIDENIS\Andrey.ChalkinKeen Yee Liau
SIDENIS\Andrey.Chalkin
authored and
Keen Yee Liau
committed
feat(@schematics/angular): add UrlTree to CanActivate method signature
1 parent 5064012 commit bf93f52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@angular/core';
2-
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2+
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
33
import { Observable } from 'rxjs';
44

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

0 commit comments

Comments
 (0)