MCPcopy
hub / github.com/angular/angular / NgAdapterInjector

Class NgAdapterInjector

packages/upgrade/static/src/util.ts:14–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12} from '@angular/core';
13
14export class NgAdapterInjector implements Injector {
15 constructor(private modInjector: Injector) {}
16
17 // When Angular locate a service in the component injector tree, the not found value is set to
18 // `NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR`. In such a case we should not walk up to the module
19 // injector.
20 // AngularJS only supports a single tree and should always check the module injector.
21 get(token: any, notFoundValue?: any): any {
22 if (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
23 return notFoundValue;
24 }
25
26 return this.modInjector.get(token, notFoundValue);
27 }
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…