title: Unknown provider: $routeParamsProvider <- $routeParams
body: <p>I am currently learning AngularJS &amp; Ionic by creating a simple podcast app.
  I am trying to use routeParams to get the "itemId" but I am getting the following error:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Error: [$injector:unpr] Unknown provider: $routeParamsProvider &lt;- $routeParams &lt;- DetailsController
  http://errors.angularjs.org/1.4.3/$injector/unpr?p0=%24routeParamsProvider%20%3C-%20%24routeParams%20%3C-%20DetailsController
  minErr/</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now this is how I pass the "itemId"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  .state('ted', {
      url: '/ted/:itemId',
      templateUrl: 'templates/ted-talks.html',
      controller: 'DetailsController'
    })</code></pre>
  </div>
  </div>
  </p>
  
  <p>and here is my controller:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>starter.controller("DetailsController", ["$scope", "$routeParams", "$http", function ($scope, $routeParams, $http) {
    $http.get('http://api.npr.org/query?id=57&amp;apiKey={I've taken the ID off})
    .success(function(data, status, headers, config){
      var x2js = new X2JS();
      var jsonOutput = x2js.xml_str2json(data);
      console.log(jsonOutput);
  
       $scope.stories = jsonOutput.nprml.list.story;
       
       if($routeParams.itemId) {
        console.log('Single page id' + $routeParams.itemId);
       }
  
  
    })
    .error(function(data, status, headers, config){
      alert('There is a problem');
    })
  }]);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any ideas what causes this error? I belive that the routeParams is already included in the ionic framework as the demos they provide seem to work, bu I can't figure out how.</p>
  
  <p>Any help is much appreceated :)</p>