( route: Route, currentInjector: EnvironmentInjector, )
| 29 | * @param currentInjector The parent injector of the `Route` |
| 30 | */ |
| 31 | export function getOrCreateRouteInjectorIfNeeded( |
| 32 | route: Route, |
| 33 | currentInjector: EnvironmentInjector, |
| 34 | ): EnvironmentInjector { |
| 35 | if (route.providers && !route._injector) { |
| 36 | route._injector = createEnvironmentInjector( |
| 37 | route.providers, |
| 38 | currentInjector, |
| 39 | `Route: ${route.path}`, |
| 40 | ); |
| 41 | } |
| 42 | return route._injector ?? currentInjector; |
| 43 | } |
| 44 | |
| 45 | export function getLoadedRoutes(route: Route): Route[] | undefined { |
| 46 | return route._loadedRoutes; |
no test coverage detected
searching dependent graphs…