[英]Angular Universal - lazy load issue
I'm using Angular2 Universal as a starter for my project. 我正在将Angular2 Universal用作项目的启动器。 When I setup the starter and run the app, the lazy loaded "bundle" gets loaded even though I haven't navigated to the lazy page.
当我安装启动程序并运行应用程序时,即使我没有导航到惰性页面,也将加载惰性加载的“捆绑软件”。
Is that how it's suppose to work? 那是应该如何工作的吗?
I figured it out. 我想到了。 The chunks were getting "PRELOADED" that's why it's showing in the network request.
这些块正在获取“ PRELOADED”,这就是为什么它在网络请求中显示的原因。
To prevent preloading, go into browser.module.ts and remove "preloadingStrategy: IdlePreload" 为了防止预加载,请进入browser.module.ts并删除“ preloadingStrategy:IdlePreload”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.