title: AngularJS, resolve and unknown provider
body: <p>I've two routes with resolve. Goes like this:</p>
  
  <pre><code>.when('/foos', {
  templateUrl: 'views/foos.html',
  controller: 'FoosCtrl',
  resolve: {
      foo_list: ['$q', '$route', '$timeout', '$location', 'Foos', function($q, $route, $timeout, $location, Foos) {
          // postpone the execution
          var deferred_foo = $q.defer()
  
          Foos.getFoos({token:session_uid}, successCb)
  
          function successCb(list) {
              if(list['status'] === 200) {
                  deferred_foo.resolve(list)
              }
              else {
                  alert('Crashcrashcrash')
                  deferred_foo.reject("Something just wasn't right")
                  //$location.path('maintenance')
              }
          }
          return deferred_foo.promise
          }]
      }
  })
  .when('/r/:type/:bar_id', {
      templateUrl: 'views/bar.html',
      controller: 'BarsCtrl',
      resolve: {
          bar: ['$q', '$route', '$timeout', '$location', 'Bars', function($q, $route, $timeout, $location, Bars) {
              // postpone the execution
              var deferred = $q.defer()
  
              Bars.getBar({type: bar_type}, successCb)    
  
              function successCb(result) {
                  if(result['status'] === 200) {
                      deferred.resolve(result)    
                  }
                  else {
                      alert('Crashcrashcrash')
                      deferred.reject("Something just wasn't right")
                      $location.path('foos')
                  }
  
                  return deferred.promise
                  }]
              }
          })
  </code></pre>
  
  <p>Then I've two controllers working like this:</p>
  
  <pre><code> App.controller('FoosCtrl', ['$scope', '$location', 'Foos', 'foo_list', function($scope, $location, Foos, foo_list) {...}
  
   App.controller('BarsCtrl', ['$scope', '$routeParams', '$location', 'Bars', 'bar', 'sharedService', function($scope, $routeParams, $location, Bars, bar, sharedService) {...}
  </code></pre>
  
  <p>Could somebody explain why Bar works but Foo gives me <code>Error: Unknown provider: foo_listProvider &lt;- foo_list</code>? I've tried replacing <code>foo_list</code> with different name in case camelCasing did something but didn't help.</p>