mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs(router): canMatch route guard method signature update (#49140)
Very cosmetic, but it might be necessary : I updated the ```canAccess``` method second signature name and type in the provided sample. As it stands, it triggers `TS(2345): Argument of type 'Route' is not assignable to parameter of type 'string'`. PR Close #49140
This commit is contained in:
parent
36b9ff7ff9
commit
62350ca41b
1 changed files with 1 additions and 1 deletions
|
|
@ -915,7 +915,7 @@ export type CanDeactivateFn<T> =
|
|||
* ```
|
||||
* class UserToken {}
|
||||
* class Permissions {
|
||||
* canAccess(user: UserToken, id: string, segments: UrlSegment[]): boolean {
|
||||
* canAccess(user: UserToken, route: Route, segments: UrlSegment[]): boolean {
|
||||
* return true;
|
||||
* }
|
||||
* }
|
||||
|
|
|
|||
Loading…
Reference in a new issue