* 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[], )
| 81 | * creates a new injector and stores in the cache. |
| 82 | */ |
| 83 | function 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 |
no test coverage detected
searching dependent graphs…