* 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[], )
| 83 | * creates a new injector and stores in the cache. |
| 84 | */ |
| 85 | function getOrCreateEnvironmentInjector( |
| 86 | parentInjector: Injector, |
| 87 | tDetails: TDeferBlockDetails, |
| 88 | providers: Provider[], |
| 89 | ) { |
| 90 | return parentInjector |
| 91 | .get(CachedInjectorService) |
| 92 | .getOrCreateInjector( |
| 93 | tDetails, |
| 94 | parentInjector as EnvironmentInjector, |
| 95 | providers, |
| 96 | ngDevMode ? 'DeferBlock Injector' : '', |
| 97 | ); |
| 98 | } |
| 99 | |
| 100 | /** Injector Helpers */ |
| 101 |
no test coverage detected