title: Angular JS - angular-ui-load - error undefined
body: <p>I'would like to use the "angular-ui-load" in my app angular.
  The problem, my script js is undefined<br>
  Error in dev consol firefox :</p>
  
  <pre><code>"Error: [ng:areq] Argument 'DetailsCtrl' is not a function, got undefined
  </code></pre>
  
  <p>Now, The angular-ui-load declared in index.html</p>
  
  <pre class="lang-html prettyprint-override"><code>        &lt;!-- build:js scripts/modules.js --&gt;
          &lt;script src="bower_components/angular-resource/angular-resource.js"&gt;&lt;/script&gt;
          &lt;script src="bower_components/angular-cookies/angular-cookies.js"&gt;&lt;/script&gt;
          &lt;script src="bower_components/angular-sanitize/angular-sanitize.js"&gt;&lt;/script&gt;
          &lt;script src="bower_components/angular-ui-router/release/angular-ui-router.js"&gt;&lt;/script&gt;
          &lt;!-- endbuild --&gt;
  
          &lt;!-- build:js({.tmp,app}) scripts/scripts.js --&gt;
          &lt;script src="scripts/app.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/services/ui-load.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/controllers/main.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/controllers/alert.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/controllers/users.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/directives/ui-jq.js"&gt;&lt;/script&gt;
          &lt;!-- endbuild --&gt;
  </code></pre>
  
  
  
  <p>and 'ui.load' my app.js is :</p>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
    angular.module('webApp', [
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ui.router',
    'ui.load',
    'ui.jq',
    'zumba.angular-waypoints'
  ])
    .run(
      [          '$rootScope', '$state', '$stateParams',
        function ($rootScope,   $state,   $stateParams) {
            $rootScope.$state = $state;
            $rootScope.$stateParams = $stateParams;        
        }
      ]
    )
  
    .config(function ($stateProvider, $urlRouterProvider) {
      //delete $httpProvider.defaults.headers.common['X-Requested-With'];
      $urlRouterProvider.otherwise('/');
      $stateProvider
        .state('users', {
          url: '/users',
          templateUrl: 'views/users.html',
          controller:'UserCtrl'
        })
        .state('users.details', {
          url: '/details/:id_user',
          templateUrl: 'views/details.html',
          //controller:'UserCtrl'
          resolve: {
                    deps: ['uiLoad',
                       function( uiLoad){
                         return uiLoad.load('scripts/controllers/details.js');
                        }]
                    }
        })
  })
  </code></pre>
  
  
  
  <p>Any help would be appreciated :-) ?</p>