title: Running Jquery within Angular controller
body: <p>I have an Angular app that that multiple tabs. I am using angular-ui-router.min.js to help with some additional routing. </p>
  
  <p>Within my global controller I have embedded a jQuery function that does not load unless I start it with:</p>
  
  <pre><code>$(window).load(function () { // something });
  </code></pre>
  
  <p>This contents of the function requires that the DOM is loaded as it's looking for classes and IDs to do its thing. Even then it only works when I refresh the page. If I am switching between tabs then this function isn't called at all. </p>
  
  <p>Should I be separating my jQuery from my Angular controllers - it does feel a bit wrong that I have some DOM fiddling functions within controllers as that does goes against Angulars approach altogether. </p>