title: requirejs and angularjs 1.5 injection of ui.router failing for components
body: <p>I'm getting this error when using the recommended component loading method (<a href="https://angular-ui.github.io/ui-router/" rel="nofollow">See step 3</a> )</p>
  
  <pre><code>  Error: Module name "angular-ui-router" has not been loaded yet for context: _. Use require([])
  </code></pre>
  
  <p>app module definition:</p>
  
  <pre><code>&lt;script&gt;
    var adminApp = angular.module('adminClientApp', [require('angular-ui-router'), 'ngMaterial', 'ngResource', 'ngMessages', 'ngMdIcons']);
  &lt;/script&gt;
  </code></pre>
  
  <p>According to the doco, there isn't a need to include a script tag - it will be loaded via requirejs</p>
  
  <p>Requirejs main.js definition:</p>
  
  <pre><code>  require.config({
      paths:{
          'angular-ui-router': 'vendor/angular-ui-router/release/'
      },
      shim:{
         'angular': {
            exports: 'angular'
       }
     }
    });
  </code></pre>
  
  <p>app layout:</p>
  
  <pre><code>  -- root
       index.html
       main.js
       -- js
           -- app (angular files here)
              app.js
       -- vendor (3rd party libs)
  </code></pre>
  
  <p>requirejs main.js setting in index.html</p>
  
  <pre><code>  &lt;script data-main="main.js" src="vendor/requirejs/require.js"&gt;&lt;/script&gt;  
  </code></pre>