title: How do I resolve the ngRoute issue with Angularjs in WordPress?
body: <p>I'm writing a plugin that uses Angularjs. I've loaded Angularjs and ngRoute locally:</p>
  
  <pre><code>wp_enqueue_script('angularjs',plugins_url('/js/angular.min.js', __FILE__ ),array(),'',true);
  wp_enqueue_script('angularjsroute',plugins_url('/js/angular-route.min.js', __FILE__ ),array('angularjs'),'',true);
  </code></pre>
  
  <p>I have angularjs listed as a dependency for ngRoute so Angular loads first. However, I still get the error that says it's not loading:</p>
  
  <blockquote>
    <p>Error: [$injector:nomod] 
    <strong>Description</strong> This error occurs when a module
    fails to load due to some exception. The error message above should
    provide additional context.</p>
    
    <p><strong>Using ngRoute</strong> In AngularJS 1.2.0 and later, ngRoute has been moved to
    its own module. If you are getting this error after upgrading to 1.2.x
    or later, be sure that you've installed ngRoute.</p>
    
    <p><strong>Monkey-patching</strong> Angular's ng module This error can also occur if you
    have tried to add your own components to the ng module. This has never
    been supported and from 1.3.0 it will actually trigger this error. For
    instance the following code could trigger this error.</p>
    
    <p>angular.module('ng').filter('tel', function (){}); Instead create your
    own module and add it as a dependency to your application's top-level
    module. See #9692 and #7709 for more information</p>
  </blockquote>
  
  <p>I only get the ngRoute error when I place <code>ng-app="myPlugin"</code> to a containing div.</p>
  
  <p>When I check the output of my page I can verify that angularjs is loading first per <a href="https://stackoverflow.com/questions/23898348/angular-application-config-uncaught-object-error-ngroute">this answer</a>.</p>