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

Class OutletInjector

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected