angularjs - Why does ngif not remove script tags from my code? -


i have few script tags want removed on condition. in dom see not there (they're commented out), still see console spew them. script tags loaded regardless? if so, have workaround this?

<script ng-if="mycondition" src="blah blah.js"></script> 

it wouldn't matter if removed or not. time angular bootstraps , starts dom manipulation script tags have been compiled browser.

removing script tag not remove code has been compiled.

without lot more information on trying accomplish , or scripts do, can offered now.

i suggest read on basics of how web page gets processed browser html gets compiled dom. instant encounters script tag src , request made file , there no way intercept it.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -