I currently have a single page web application using Angular and UI-Router. The majority of my javascript files are being loaded on my index.html page, and those all work perfectly throughout the application.
Issue: I have a state that requires javascript code to run when the state is called. (When ui-router injects the html from this state's particular templateURL into the ui-view, I need the javascript within the injected html to run). I have been searching all day and have tried various solutions but nothing has worked.
Is there a best practice for adding this functionality? Thank you.