ReferenceError: $state is not defined
<p>I have a rails application which use AngularJS and I have a problem, the problem is that I want redirect to a certain <code>state</code> after a form is submited, but in the chrome's console I have a <code>ReferenceError: $state is not defined</code> and nothing happens.</p>

<p><a href="https://i.stack.imgur.com/U992M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U992M.png" alt="state error"></a></p>

<p>This is my controller.</p>

<pre><code>angular.module('myapp')

.controller('CreatePollCtrl', ['$scope', 'Restangular', '$state',
function($scope, Restangular) {

  $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('dashboard');
    });
  };
}]);
</code></pre>

<p>What can I do?, is <code>$state</code> correctly injected?</p>