title: AngularJS / ui-router: $state.go does not work inside ng-click
body: <p>I have a view where I have the following code:</p>
  
  <pre><code>&lt;input type="button" value="New Post" ng-click="$state.go('blog.new-post')"&gt;
  </code></pre>
  
  <p>The goal is to transition to a new state without having to use href. Unfortunately the code above just does not fire.</p>
  
  <p>I also tried to include $state in the controller for this view:</p>
  
  <pre><code>app.controller('blogPostsController', function($scope, $stateParams, $http, $state) ...
  </code></pre>
  
  <p>But still nothing. transictionTo also does not seem to work.</p>
  
  <p>Anyone has any idea on how to make this work?</p>
  
  <p>EDIT: I could only make it work by assigning:</p>
  
  <pre><code>$scope.$state = $state;
  </code></pre>
  
  <p>inside my controller. This seems ugly. There is really no other way to access $state without assigning it to scope?</p>