docs: add dynamic import allowed syntax to the deprecation guide (#30545)

PR Close #30545
This commit is contained in:
mgechev 2019-05-17 18:30:43 -04:00 committed by Igor Minar
parent 573f57ac90
commit 6363db89d0
1 changed files with 6 additions and 0 deletions

View File

@ -289,6 +289,12 @@ const routes: Routes = [{
</div>
<div class="alert is-helpful">
**Declaration syntax**: It's important to follow the route declaration syntax `loadChildren: () => import('...').then(m => m.ModuleName)` to allow `ngc` to discover the lazy-loaded module and the associated `NgModule`. You can find the complete list of allowed syntax constructs [here](https://github.com/angular/angular-cli/blob/a491b09800b493fe01301387fa9a025f7c7d4808/packages/ngtools/webpack/src/transformers/import_factory.ts#L104-L113). These restrictions will be relaxed with the release if Ivy since it'll no longer use `NgFactories`.
</div>
{@a activatedroute-props}