Thursday, 14 November 2019

Ionic/Angular modal gets lazy loaded

With any Ionic modal with angular, there is some code that gets lazy loaded.

Take the toast example. When you click on the "pair" button, three javascript files (see screenshot below) get loaded. The second time you click "pair", no additional file gets loaded.

This is problematic for me because I want to show a toast when internet connectivity issue is detected, so the code for the toast needs to be entirely preloaded. I can't figure out how to do this. Given that angular's lazy loading is route based, I don't understand how the toast can even have lazy-loaded code to begin with.

toast js resources



from Ionic/Angular modal gets lazy loaded

No comments:

Post a Comment