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

Function mapToCanDeactivate

packages/router/src/utils/functional_guards.ts:84–92  ·  view source on GitHub ↗
(
  providers: Array<Type<CanDeactivate<T>>>,
)

Source from the content-addressed store, hash-verified

82 * @see {@link Route}
83 */
84export function mapToCanDeactivate<T = unknown>(
85 providers: Array<Type<CanDeactivate<T>>>,
86): CanDeactivateFn<T>[] {
87 return providers.map(
88 (provider) =>
89 (...params) =>
90 inject(provider).canDeactivate(...params),
91 );
92}
93/**
94 * Maps an injectable class with a resolve function to an equivalent `ResolveFn`
95 * for use in a `Route` definition.

Callers

nothing calls this directly

Calls 3

injectFunction · 0.90
mapMethod · 0.80
canDeactivateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…