Load again!

Solved!
Posted in General by Siddharth Papreja Mon Apr 27 2015 07:10:35 GMT+0000 (UTC)·2·Viewed 2,327 times

What if I call $ocLazyLoad.load('myFile.js') again? I see in the network tab it does not load that module again which is what I want but I want to know what exactly is happening?
Olivier Combe
June 3, 2015

When you load a file the first time, we store the promise for this path in an array so that another call to the same path is resolved immediately as a success.
If you call the same file with a different url (by appending new parameters) then it will be reloaded (since the file cache is based on the path).
If loading the file fails, then this promise is removed from the cache so that you can try to reload it again.


Olivier Combe marked this as solved
Jay
Sep 30, 2016

How Can I show status of loading ... ?

Markdown is allowed