How can I check or prove that a module in angular2 is lazy loaded?

前端 未结 3 1420
南笙
南笙 2021-02-08 12:21

If I have access to an angular2 application\'s code and there is a module that is supposedly lazy loaded, is there a way, independent of examining the code, that I can test that

3条回答
  •  孤街浪徒
    2021-02-08 12:38

    Check the Network tab of chrome dev tools (ctrl + shift + i) in the Google Chrome browser.

    If your module is not being lazy loaded you will see a row for the module in the network tab when the site first loads up.

    If it is being lazily loaded properly then you will see the row for the module only when you navigate to the corresponding route.

    Hope this helps.

提交回复
热议问题