Lazy load Angular 5 error: $$_lazy_route_resource lazy recursive

后端 未结 9 1999
傲寒
傲寒 2020-12-29 20:20

I\'m using angular cli AoT compilation. When I try to make a lazy load component following this tutorial, I got the error below:

ERROR Error         


        
相关标签:
9条回答
  • 2020-12-29 21:08

    Please see this comment on the 1.7.x bug. The issue seems to be importing the lazy loaded module into the AppModule. Removing that import fixed the issue for me: https://github.com/angular/angular-cli/issues/9488#issuecomment-374037802

    0 讨论(0)
  • 2020-12-29 21:10

    There is an open bug on angular-cli 1.7.x: https://github.com/angular/angular-cli/issues/9488#issuecomment-368871510

    Downgrade to 1.6.8 solve the issue for me.

    0 讨论(0)
  • 2020-12-29 21:18

    In your app.module.ts, did you import ListModule ?

    I faced same issue, and was able to fix it by removing lazy loaded modules from imports in app.module.ts

    0 讨论(0)
提交回复
热议问题