title: angular ui-router $stateParams in json string
body: <p>I'm using $stateParams to successfully get a dynamic id, but I haven't been successful in get the param value to work within my json data string.</p>
  
  <p>Here's my controller:</p>
  
  <pre><code>app.controller('TestController', function($scope, resolveJson, $stateParams) {
    //This verifies that the id value works
    $scope.pageid = $stateParams.id;
  
    //This doesn't work
    $scope.data = resolveJson.data.$stateParams.id;
  
    //This also doesn't work
    $scope.data = resolveJson.data.pageid;
  
    //This does work, but it's now not dynamic
    $scope.data = resolveJson.data.7;
  }
  </code></pre>