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

Class ConfigurableGuard

packages/router/test/integration/guards.spec.ts:2029–2036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2027
2028 describe('canMatch', () => {
2029 @Injectable({providedIn: 'root'})
2030 class ConfigurableGuard {
2031 result: Promise<boolean | UrlTree> | Observable<boolean | UrlTree> | boolean | UrlTree =
2032 false;
2033 canMatch() {
2034 return this.result;
2035 }
2036 }
2037
2038 it('falls back to second route when canMatch returns false', async () => {
2039 const router = TestBed.inject(Router);

Callers

nothing calls this directly

Calls 1

InjectableInterface · 0.90

Tested by

no test coverage detected