docs: Add documentation about the CLI failing (#35385)
The CLI seems to throw very non-descriptive errors. Adding a section to help users troubleshoot lazy-loading modules. PR Close #35385
This commit is contained in:
parent
529f0a83cb
commit
7fa881919b
|
@ -322,6 +322,13 @@ ngOnInit() {
|
|||
|
||||
For more information with a working example, see the [routing tutorial section on preloading](guide/router-tutorial-toh#preloading-background-loading-of-feature-areas).
|
||||
|
||||
## Troubleshooting lazy-loading modules
|
||||
|
||||
A common error when lazy-loading modules is importing common modules in multiple places within an application. You can test for this condition by first generating the module using the Angular CLI and including the `--route route-name` parameter, where `route-name` is the name of your module. Next, generate the module without the `--route` parameter. If the Angular CLI generates an error when you use the `--route` parameter, but runs correctly without it, you may have imported the same module in multiple places.
|
||||
|
||||
Remember, many common Angular modules should be imported at the base of your application.
|
||||
|
||||
For more information on Angular Modules, see [NgModules](guide/ngmodules).
|
||||
|
||||
## More on NgModules and routing
|
||||
|
||||
|
|
Loading…
Reference in New Issue