title: angular/ionic: unknown provider, error result of injector unable to resolve a required dependency
body: <p>I seem to be having an issue regarding an $injector being unable to resolve a dependency. </p>
  
  <p>The error received is: Unknown provider: itemsProvider &lt;- items &lt;- ItemListCtrl</p>
  
  <p>I have looked at the samples on this page: <a href="https://docs.angularjs.org/error/" rel="nofollow">https://docs.angularjs.org/error/</a>$injector/unpr?p0=itemsProvider%20%3C-%20items%20%3C-%20ItemListCtrl</p>
  
  <p>However, it seems that my code doesn't seem to have the same issue as there are no controller within controller dependencies or usage of services/directives.</p>
  
  <p>Can anyone spot what's wrong?    </p>
  
  <pre><code>angular.module('starter', ['ionic'])
  
  .run(function($ionicPlatform) {
    $ionicPlatform.ready(function() {
      // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
      // for form inputs)
      if (window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {
        cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        cordova.plugins.Keyboard.disableScroll(true);
  
      }
      if (window.StatusBar) {
        // org.apache.cordova.statusbar required
        StatusBar.styleDefault();
      }
    });
  })
  
  .config(function($stateProvider, $urlRouterProvider) {
    $stateProvider       
   .state('app.items', {
          url: '/items',
          views: {
              'menuContent': {
                  templateUrl: 'templates/item-list.html',
                  controller: 'ItemListCtrl'
              },
          }
      })
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>    .controller('ItemListCtrl', function($scope, $log, $stateParams, items) {
  
              items.getItems(function(items) {
                  $scope.items = items;
                  //console.log(items);
              });
          })
  </code></pre>
  
  <p>From index.html</p>
  
  <pre><code>     &lt;ion-item menu-close href="#/app/items"&gt;
            items
       &lt;/ion-item&gt;
  </code></pre>
  
  <p>Factory method:</p>
  
  <pre><code>    angular.module('starter')
      //Factory
  
  
          .factory('items', function($http) {
  </code></pre>