Skip to content

Commit 8e05a5e

Browse files
geromegrignonclydin
authored andcommitted
fix(@schematics/angular): canLoad guard signature
add UrlTree to canLoad guard signature to match the documentation and the other implementations Closes: #18751
1 parent 14d70d1 commit 8e05a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/guard/files/__name@dasherize__.guard.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class <%= classify(name) %>Guard implements <%= implementations %> {
2525
}
2626
<% } %><% if (implements.includes('CanLoad')) { %>canLoad(
2727
route: Route,
28-
segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean {
28+
segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
2929
return true;
3030
}<% } %>
3131
}

0 commit comments

Comments
 (0)