MCPcopy
hub / github.com/angular/angular / injectableDefInScope

Method injectableDefInScope

packages/core/src/di/r3_injector.ts:551–561  ·  view source on GitHub ↗
(def: ɵɵInjectableDeclaration<any>)

Source from the content-addressed store, hash-verified

549 }
550
551 private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {
552 if (!def.providedIn) {
553 return false;
554 }
555 const providedIn = resolveForwardRef(def.providedIn);
556 if (typeof providedIn === 'string') {
557 return providedIn === 'any' || this.scopes.has(providedIn);
558 } else {
559 return this.injectorDefTypes.has(providedIn);
560 }
561 }
562
563 private removeOnDestroy(callback: () => void): void {
564 const destroyCBIdx = this._onDestroyHooks.indexOf(callback);

Callers 1

getMethod · 0.95

Calls 2

resolveForwardRefFunction · 0.90
hasMethod · 0.65

Tested by

no test coverage detected