angular-load icon indicating copy to clipboard operation
angular-load copied to clipboard

Remove scripts from DOM

Open zlalanne opened this issue 10 years ago • 4 comments

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.

zlalanne avatar Aug 25 '14 21:08 zlalanne

Would be nice indeed. Is there any proposed way to achieve this automatically?

urish avatar Aug 30 '14 23:08 urish

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 avatar Sep 02 '14 16:09 zlalanne

@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!

vaneshmali avatar Jul 14 '15 09:07 vaneshmali

I've been using this solution and it seems to work perfectly: http://stackoverflow.com/a/9425964

soumak77 avatar Jun 20 '16 05:06 soumak77