angular-load
angular-load copied to clipboard
Remove scripts from DOM
Would be nice to be able to remove scripts from the DOM once the page/url changes. This way the DOM doesn't end up with a ton of script tags. Don't think this is a huge performance concern, just a nice feature.
Would be nice indeed. Is there any proposed way to achieve this automatically?
Maybe keep track of the elements in an array as their loaded and on a route change remove from DOM. Haven't tried it yet though.
@zlalanne : Same, I want. Using Requirejs with AngularAMD. Want to remove script from DOM. If is there any solution for this then it will be better for me!
I've been using this solution and it seems to work perfectly: http://stackoverflow.com/a/9425964