How to get toState param with $transitions service? (new ui-router)
<p>I'm using <strong>ui-router</strong> <a href="http://angular-ui.github.io/ui-router/1.0.0-alpha.3" rel="noreferrer">1.0.0-alpha.3</a>.
Old events <a href="http://angular-ui.github.io/ui-router/1.0.0-alpha.3/modules/ng1_state_events.html#_statechangestart" rel="noreferrer">are deprecated there</a>.</p>

<p>so I'm trying to convert </p>

<pre><code>  $rootScope.$on('$stateChangeStart', (event, toState) =&gt; {
    //...
  });
</code></pre>

<p>to new way of doing things with <strong>$transitions.onStart</strong> hook - </p>

<pre><code>  $transitions.onStart( {}, function($state, $transition$) {
      //...
  });
</code></pre>

<p>where could I get <strong><em>toState</em></strong> param in this case?</p>