| 12 | } from '@angular/core'; |
| 13 | |
| 14 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…