MCPcopy
hub / github.com/angular/angular / injectorFactory

Function injectorFactory

packages/upgrade/static/src/angular1_providers.ts:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 tempInjectorRef = injector;
18}
19export function injectorFactory() {
20 if (!tempInjectorRef) {
21 throw new Error('Trying to get the AngularJS injector before it being set.');
22 }
23
24 const injector: IInjectorService = tempInjectorRef;
25 tempInjectorRef = null; // clear the value to prevent memory leaks
26 return injector;
27}
28
29export function rootScopeFactory(i: IInjectorService) {
30 return i.get('$rootScope');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…