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

Method injectableDefInScope

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

Source from the content-addressed store, hash-verified

554 }
555
556 private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {
557 if (!def.providedIn) {
558 return false;
559 }
560 const providedIn = resolveForwardRef(def.providedIn);
561 if (typeof providedIn === 'string') {
562 return providedIn === 'any' || this.scopes.has(providedIn);
563 } else {
564 return this.injectorDefTypes.has(providedIn);
565 }
566 }
567
568 private removeOnDestroy(callback: () => void): void {
569 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