简体   繁体   中英

Angular Universal - lazy load issue

I'm using Angular2 Universal as a starter for my project. 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.

To prevent preloading, go into browser.module.ts and remove "preloadingStrategy: IdlePreload"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM