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

Function getOrCreateRouteInjectorIfNeeded

packages/router/src/utils/config.ts:31–43  ·  view source on GitHub ↗
(
  route: Route,
  currentInjector: EnvironmentInjector,
)

Source from the content-addressed store, hash-verified

29 * @param currentInjector The parent injector of the `Route`
30 */
31export 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
45export function getLoadedRoutes(route: Route): Route[] | undefined {
46 return route._loadedRoutes;

Callers 1

matchWithChecksFunction · 0.90

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…