From 6245dd6d061f6b839515703c09d1da567c54f16b Mon Sep 17 00:00:00 2001 From: geromegrignon Date: Fri, 11 Sep 2020 09:58:49 +0200 Subject: [PATCH] fix(@schematics/angular): canLoad guard signature add UrlTree to canLoad guard signature to match the documentation and the other implementations Closes: #18751 --- .../angular/guard/files/__name@dasherize__.guard.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts.template b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts.template index e0f57cde820b..e41530b35898 100644 --- a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts.template +++ b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts.template @@ -25,7 +25,7 @@ export class <%= classify(name) %>Guard implements <%= implementations %> { } <% } %><% if (implements.includes('CanLoad')) { %>canLoad( route: Route, - segments: UrlSegment[]): Observable | Promise | boolean { + segments: UrlSegment[]): Observable | Promise | boolean | UrlTree { return true; }<% } %> }