MCPcopy Index your code
hub / github.com/angular/angular / mapToCanActivate

Function mapToCanActivate

packages/router/src/utils/functional_guards.ts:50–56  ·  view source on GitHub ↗
(providers: Array<Type<CanActivate>>)

Source from the content-addressed store, hash-verified

48 * @see {@link Route}
49 */
50export function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {
51 return providers.map(
52 (provider) =>
53 (...params) =>
54 inject(provider).canActivate(...params),
55 );
56}
57/**
58 * Maps an array of injectable classes with canActivateChild functions to an array of equivalent
59 * `CanActivateChildFn` for use in a `Route` definition.

Callers 1

Calls 3

injectFunction · 0.90
mapMethod · 0.80
canActivateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…