title: Keep element in focus after state changed
body: <p>In my AngularJS/Ui-Router application I have a series of input box like this:</p>
  
  <pre><code>&lt;input ng-model="vm.filter" ng-keyup="vm.onKeyUp($event)" type="text" class="form-control" id="filter"&gt;
  </code></pre>
  
  <p>Then I have a controller, in which I have put the <code>onKeyUp</code> function, that looks like this:</p>
  
  <pre><code>var vm = this;
  vm.onKeyUp = function (e) {
      var val = e.currentTarget.value;
      $state.go('aState', { 'filter': val });
  }
  </code></pre>
  
  <p>This will fire the state change (really just state parameter <code>filter</code> is changed) that will call a <a href="https://github.com/angular-ui/ui-router/wiki#resolve" rel="nofollow">resolve</a> behind the scene and at the end of the flow, my data set is filtered and the subset is showed. Amazing.</p>
  
  <p>But there is a little problem: on the state changed the HTML input lost its focus, and I can't figure out how can set it on focus at the end of the flow.
  This is necessary since the user start to write in the input box and then will be surprised when his focus get "misteriously" lost. Bad UI experience.</p>