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

Function guard3

packages/router/test/integration/guards.spec.ts:2495–2499  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2493 );
2494 const guard2: CanActivateFn = () => of(true).pipe(tap(() => guardDone.push('guard2')));
2495 const guard3: CanActivateFn = () =>
2496 of(true).pipe(
2497 switchMap((v) => new Promise((r) => setTimeout(r, 2)).then(() => v)),
2498 tap(() => guardDone.push('guard3')),
2499 );
2500 const guard4: CanActivateFn = () =>
2501 of(true).pipe(
2502 switchMap((v) => new Promise((r) => setTimeout(r, 6)).then(() => v)),

Callers

nothing calls this directly

Calls 3

setTimeoutFunction · 0.85
thenMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected