muratcorlu / ngx-script-loader

Angular 3rd party script loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove script feature

MurhafSousli opened this issue · comments

Hi, I want to destroy a script on component destroy, is it possible to remove a script after it is loaded?

Removing script tag from document will not disable the code that we already injected. I don't know any way to really clean JS code from document after it's run once.

Yea, that's right, the script can be remove using event.target.remove() but the problem is with cleaning up!