MCPcopy Create free account
hub / github.com/angular/angular / redirectIfUrlTree

Function redirectIfUrlTree

packages/router/src/operators/check_guards.ts:269–278  ·  view source on GitHub ↗
(urlSerializer: UrlSerializer)

Source from the content-addressed store, hash-verified

267}
268
269function redirectIfUrlTree(urlSerializer: UrlSerializer): OperatorFunction<GuardResult, boolean> {
270 return pipe(
271 tap((result: GuardResult) => {
272 if (typeof result === 'boolean') return;
273
274 throw redirectingNavigationError(urlSerializer, result);
275 }),
276 map((result) => result === true),
277 );
278}
279
280export function runCanMatchGuards(
281 injector: EnvironmentInjector,

Callers 2

runCanLoadGuardsFunction · 0.85
runCanMatchGuardsFunction · 0.85

Calls 2

pipeFunction · 0.85

Tested by

no test coverage detected