MCPcopy
hub / github.com/angular/angular / canLoad

Method canLoad

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

Source from the content-addressed store, hash-verified

1800 static delayedExecutions = 0;
1801 static canLoadCalls = 0;
1802 canLoad() {
1803 DelayedGuard.canLoadCalls++;
1804 return of(true).pipe(
1805 switchMap((v) => new Promise((r) => setTimeout(r, 10)).then(() => v)),
1806 tap(() => {
1807 DelayedGuard.delayedExecutions++;
1808 }),
1809 );
1810 }
1811 }
1812 const router = TestBed.inject(Router);
1813 router.resetConfig([

Callers

nothing calls this directly

Calls 2

setTimeoutFunction · 0.85
thenMethod · 0.65

Tested by

no test coverage detected