MCPcopy Create free account
hub / github.com/angular/angular / forChild

Method forChild

packages/router/src/router_module.ts:182–187  ·  view source on GitHub ↗

* Creates a module with all the router directives and a provider registering routes, * without creating a new Router service. * When registering for submodules and lazy-loaded submodules, create the NgModule as follows: * * ```ts * @NgModule({ * imports: [RouterModule.forChild(RO

(routes: Routes)

Source from the content-addressed store, hash-verified

180 *
181 */
182 static forChild(routes: Routes): ModuleWithProviders<RouterModule> {
183 return {
184 ngModule: RouterModule,
185 providers: [{provide: ROUTES, multi: true, useValue: routes}],
186 };
187 }
188}
189
190/**

Callers 15

LazyModuleClass · 0.45
LazyModuleClass · 0.45
LoadedModule2Class · 0.45
LoadedModule1Class · 0.45
ChildClass · 0.45
LoadedModule3Class · 0.45
LoadedModuleClass · 0.45
LoadedModuleClass · 0.45
LoadedModuleClass · 0.45
LazyLoadedModuleClass · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected