urish / angular-load

Dynamically load scripts and css stylesheets in your Angular.JS app
MIT License
243 stars 65 forks source link

Remove promise when unloading CSS. Allows re-loading the same CSS. #36

Closed francisrath closed 7 years ago

francisrath commented 7 years ago

Thank you for merging my changes. I noted another issue in the way I use your script, and this PR fixes it.

The problem is that I need a certain CSS only for one controller, and I need to load it when entering the controller and unloading it when destroying the controller.

The way unloadCSS worked it kept the promise in place, which meant loadCSS would return without doing anything. There might be a better way to do this, but it works for me. :)

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 13d5ed9171db40eb46bebe9375407a7648745961 on digitalcreations:master into d6f2aa50f8041681299aa40871795d9b4ed3cd3d on urish:master.

urish commented 7 years ago

Thanks!