ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

Unable to re-load CSS #313

Open M21B8 opened 8 years ago

M21B8 commented 8 years ago

If I load a CSS file via ocLazyLoad, and then remove it from the DOM via the suggested code

$("link[href='css/style.css']").remove();

I cant add it back without forcing a reload from the server (which I would prefer to avoid)

I have a large number of modules, and want to switch CSS files when moving through the app, but I can't currently reload a previously loaded module this way. Would be good if there was a way I could tell the service to re-add the element if its been removed.