◐ Shell
clean mode source ↗

CanMatch fixes by atscott · Pull Request #46394 · angular/angular

… guards

Once a `Route` matches via the `match` or `path` property, we need to
immediately create the injector for the route (if it has providers)
before running the `CanMatch` guards. This is necessary because the
`CanMatch` guards might be provided in the `Route` providers.

Fixes angular#46386

AndrewKushnir

AndrewKushnir

The `CanMatchFn` is already exposed in the type signature for `canMatch` on the
`Route`. This function type should already be exposed as public API but was
missed in the initial implementation because the older guards use the `any` type
instead.

AndrewKushnir pushed a commit that referenced this pull request

Jun 17, 2022
The `CanMatchFn` is already exposed in the type signature for `canMatch` on the
`Route`. This function type should already be exposed as public API but was
missed in the initial implementation because the older guards use the `any` type
instead.

PR Close #46394