title: how to load angularjs and my models at the correct time
body: <p>I am struggling to find a way to get angular and my code to play nicely and since angular is awesome i know it must be my problem.
  Some of my models have static data only but most have either only dynamic data that i pull in from rest services or a combination of static/rest data.
  many of the examples i see here and in the docs just deal with a small static json set of data.</p>
  
  <p>My problem when i put the angular script call in the html it tries to load and execute before my models are loaded and ready to go. there has to be a way to coordinate that loading time.</p>
  
  <p>So i have tried to devise ways to make sure my model js scripts are all loaded and then finally call for the angular script in a getScript call.</p>
  
  <p>Also i wrote a custom filter and i want that to be added to my module. when i add the module name to the ng-app tag and i try to lazy load the angular script via getScript it errors and says it doesn't recognize my module name.
  If i remove the module name from ng-app and then try to initialize my filter module it does lazy load angular.js but then it says my filter method is invalid because (i guess) it is not registered with the model.</p>
  
  <p>I'm sure i'm missing some key piece of information somewhere. Angular has to be smart enough to load and then realize that my models will take a few moments to arrive. Not just run through my html and bark at the first ng-controller tag because the model isn't loaded or the service call to fill the model is not done yet.</p>
  
  <p>Right now if i put a tag on my html like so:</p>
  
  <pre><code>&lt;html class="no-js" ng-app="yourApp"&gt;
  </code></pre>
  
  <p>I get an error when i call getScript on angular.js that says</p>
  
  <blockquote>
    <p>angular.js failed to load: Error: No module: yourApp</p>
  </blockquote>
  
  <p>Please help. thanks for any suggestions.</p>