MCPcopy
hub / github.com/angular/angular / createInjector

Function createInjector

packages/core/src/di/create_injector.ts:21–35  ·  view source on GitHub ↗
(
  defType: /* InjectorType<any> */ any,
  parent: Injector | null = null,
  additionalProviders: Array<Provider | StaticProvider> | null = null,
  name?: string,
)

Source from the content-addressed store, hash-verified

19 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
20 */
21export function createInjector(
22 defType: /* InjectorType<any> */ any,
23 parent: Injector | null = null,
24 additionalProviders: Array<Provider | StaticProvider> | null = null,
25 name?: string,
26): Injector {
27 const injector = createInjectorWithoutInjectorInstances(
28 defType,
29 parent,
30 additionalProviders,
31 name,
32 );
33 injector.resolveInjectorInitializers();
34 return injector;
35}
36
37/**
38 * Creates a new injector without eagerly resolving its injector types. Can be used in places

Callers 3

createFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…