title: Child controller fires JSON.parse from parent
body: <p>In my app I have a ui-router state  <code>home.container-big</code> and that state has a nested state <code>home.container-big.container-big-trailer</code>.</p>
  
  <p>In the <code>home.container-big</code> state I return a value in the form of a string. For my <code>movie-info.html</code> template I need to change the string value into a object. So I use <code>JSON.parse</code>.</p>
  
  <pre><code>.state('home.container-big',{
    params: {
      value: null
    },
    url: '',
    views: {
      "container-big":{
        templateUrl: '../assets/angular-app/templates/_movie-info.html',
        controller: function($scope, $stateParams, $state) {
          $scope.movie = JSON.parse($stateParams.value);
          $scope.movie = $stateParams.value;
        }
      }
    }
  })
  </code></pre>
  
  <p>In the <code>home.container-big.container-big-trailer</code> state I return a string value and place the data in <code>$scope.trailer_link</code> so I can use the scope in the <code>_container-trailer</code> template.</p>
  
  <pre><code>.state('home.container-big.container-big-trailer',{
    params: {
      value: null
    },
    url: '',
    views: {
      "youtube_trailer":{
        templateUrl: '../assets/angular-app/templates/_container-trailer.html',
        controller: function($scope, $stateParams, $state) {
          $scope.trailer_link = $stateParams.value);
          console.log ($scope.trailer_link)
        }
      }
    }
  })
  </code></pre>
  
  <p>My problem here is that the <code>$stateParams.value</code> inside the <code>home.container-big.container-big-trailer</code> also goes through the <code>JSON.parse</code> from the parent state <code>home.container-big</code>. Which causes the error,</p>
  
  <pre><code>SyntaxError: Unexpected token R
    at Object.parse (native)
  </code></pre>
  
  <p>Because if I remove the <code>JSON.parse</code> from my router controller all the code works fine but there are some problems with data inside templates.</p>