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

Class OutletInjector

packages/router/src/directives/router_outlet.ts:414–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414class OutletInjector implements Injector {
415 constructor(
416 private route: ActivatedRoute,
417 private childContexts: ChildrenOutletContexts,
418 private parent: Injector,
419 private outletData: Signal<unknown>,
420 ) {}
421
422 get(token: any, notFoundValue?: any): any {
423 if (token === ActivatedRoute) {
424 return this.route;
425 }
426
427 if (token === ChildrenOutletContexts) {
428 return this.childContexts;
429 }
430
431 if (token === ROUTER_OUTLET_DATA) {
432 return this.outletData;
433 }
434
435 return this.parent.get(token, notFoundValue);
436 }
437}
438
439export const INPUT_BINDER = new InjectionToken<RoutedComponentInputBinder>(
440 typeof ngDevMode !== 'undefined' && ngDevMode ? 'Router Input Binder' : '',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected