External js file only works in the first rootPage

I include the jquery.js and some other js files in the index.html, but they only work when the app at the starting root page. If i switch to other pages the js are not working any more.
Is there somebody comes across this issue?

I find that js doesn’t work because the click event listener miss two things , but on the rootpage they will not miss . I don’t know why.

Same problem here! We need to execute JavaScript on a View, and we cannot do this.

I think maybe it’s because the js executes before the pages except the rootpage, so some directives dont run. I’m trying whether reload js file can solve this problem. By the way do you know how to reload js file on a certain page?

I think it’s due view its forcecached. Exists any way to disable view Cache?

Hi! It works ! To reload the js can solve this problem.

loadScript () { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '../build/js/external-libaries.js'; document.body.appendChild(script); };

and in constructor add
this.loadScript();

You can have a try at this

it not works for me. i want include boottsatraps