title: Example of using a parameter passed through $state.go
body: <p>Can someone explain how to use parameters sent with $state.go? In CreatePollController I create a poll which I send to the state <code>add_data_poll</code> (<code>AddDataPollController</code>), but I really don't know how to access this parameter to display it in the view or use it in the controller (I tried to see the response with <code>console.log($scope.response)</code>, but it doesn't work), can anyone explain me?</p>
  
  <pre><code>angular.module('estudios')
  
  .controller('CreatePollController', ['$scope', 'Restangular', '$state',
  function($scope, Restangular, $state) {
  
    $scope.addPoll = function() {
      if ($scope.allow_anonymous_answer == null)
        $scope.allow_anonymous_answer = false
  
      var poll = {title: $scope.title, description: $scope.description, allow_anonymous_answer: $scope.allow_anonymous_answer, initial_message: $scope.initial_message, final_message: $scope.final_message};
      Restangular.all('polls').post(poll).then(function(response) {
        $state.go('add_data_poll', response);
      });
    };
  }])
  
  .controller('AddDataPollController', ['$scope', 'Restangular',
  function($scope, Restangular) {
  }]);
  </code></pre>
  
  <p>And these are the corresponding states.</p>
  
  <pre><code>        .state('create_poll', {
        url: '/create_poll',
              parent: 'home',
        templateUrl: 'poll/create_poll.html',
        controller: 'CreatePollController'
      })
          .state('add_data_poll', {
        url: '/create_poll/add_data_poll',
              parent: 'home',
        templateUrl: 'poll/add_data_poll.html',
        controller: 'AddDataPollController'
  </code></pre>