MCPcopy Index your code
hub / github.com/angular/angular / getOrCreateEnvironmentInjector

Function getOrCreateEnvironmentInjector

packages/core/src/defer/rendering.ts:83–96  ·  view source on GitHub ↗

* Checks whether there is a cached injector associated with a given defer block * declaration and returns if it exists. If there is no cached injector present - * creates a new injector and stores in the cache.

(
  parentInjector: Injector,
  tDetails: TDeferBlockDetails,
  providers: Provider[],
)

Source from the content-addressed store, hash-verified

81 * creates a new injector and stores in the cache.
82 */
83function getOrCreateEnvironmentInjector(
84 parentInjector: Injector,
85 tDetails: TDeferBlockDetails,
86 providers: Provider[],
87) {
88 return parentInjector
89 .get(CachedInjectorService)
90 .getOrCreateInjector(
91 tDetails,
92 parentInjector as EnvironmentInjector,
93 providers,
94 ngDevMode ? 'DeferBlock Injector' : '',
95 );
96}
97
98/** Injector Helpers */
99

Callers 1

createDeferBlockInjectorFunction · 0.85

Calls 2

getOrCreateInjectorMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…