docs: update inline lazy loading example to use the import syntax (#32260)
PR Close #32260
This commit is contained in:
parent
d5071651df
commit
f438ae8a3a
|
@ -372,17 +372,14 @@ export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParam
|
||||||
* into multiple bundles and loading them on demand.
|
* into multiple bundles and loading them on demand.
|
||||||
* To use lazy loading, provide the `loadChildren` property instead of the `children` property.
|
* To use lazy loading, provide the `loadChildren` property instead of the `children` property.
|
||||||
*
|
*
|
||||||
* Given the following example route, the router uses the registered
|
* Given the following example route, the router will lazy load
|
||||||
* `NgModuleFactoryLoader` to fetch an NgModule associated with 'team'.
|
* the associated module on demand using the browser native import system.
|
||||||
* It then extracts the set of routes defined in that NgModule,
|
|
||||||
* and transparently adds those routes to the main configuration.
|
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* [{
|
* [{
|
||||||
* path: 'team/:id',
|
* path: 'lazy',
|
||||||
* component: Team,
|
* loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),
|
||||||
* loadChildren: 'team'
|
* }];
|
||||||
* }]
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
|
|
Loading…
Reference in New Issue