title: How to pass parameter when I redirect the page in angularjs using ui router?
body: <p>I am trying to pass parameters via the ui-router state.go</p>
  
  <p>However, I am not sure how to pass the parameters. Here are my codes</p>
  
  <pre><code>app.config(function($stateProvider) {    
      $stateProvider
          .state('first', {
              url: '/first',
              templateUrl: 'first.html'
          })
          .state('second', {
              url: '/second',
              templateUrl: 'second.html'
          })
  })
  
  //my first.html
  app.controller.('firstCtrl' ,["$scope", "$state", function($scope, $state){
      $scope.userInput &lt;- come from user
      $scope.clickThis=function() {
          $state.go("second", $scope.userInput);
      }
  
  }]);
  
  //my second.html
  app.controller.('secondCtrl,["$scope", "$state", function($scope, $state){
      //How do I get the parameter that is passed to here..
  })
  </code></pre>
  
  <p>I can redirect the page to second.html but I can't seem to get the parameter that is passed to my secondCtrl. 
  Can anyone help me about it?</p>
  
  <p>Thanks.</p>