From f438ae8a3a8735188cbe3548e54c2efb541d6dfd Mon Sep 17 00:00:00 2001 From: Arne Hoek Date: Thu, 26 Sep 2019 14:41:59 +0200 Subject: [PATCH] docs: update inline lazy loading example to use the import syntax (#32260) PR Close #32260 --- packages/router/src/config.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/router/src/config.ts b/packages/router/src/config.ts index eabd9dc404..658b97aae2 100644 --- a/packages/router/src/config.ts +++ b/packages/router/src/config.ts @@ -372,17 +372,14 @@ export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParam * into multiple bundles and loading them on demand. * To use lazy loading, provide the `loadChildren` property instead of the `children` property. * - * Given the following example route, the router uses the registered - * `NgModuleFactoryLoader` to fetch an NgModule associated with 'team'. - * It then extracts the set of routes defined in that NgModule, - * and transparently adds those routes to the main configuration. + * Given the following example route, the router will lazy load + * the associated module on demand using the browser native import system. * * ``` * [{ - * path: 'team/:id', - * component: Team, - * loadChildren: 'team' - * }] + * path: 'lazy', + * loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule), + * }]; * ``` * * @publicApi