title: ui-router $transitions hooks not getting called on browser reload
body: <p>I'm making an app in Angular 1.5.8 with ui-router 1.0.3.
  Ui router's hooks are great but <strong>they are not working on browser reload</strong>.</p>
  
  <p>Here is my <strong>config block</strong> for registering states:</p>
  
  <pre><code>(function(app) {
      'use strict';
      app.config(configFn);
  
      configFn.$inject = ['$stateProvider'];
  
      function configFn($stateProvider) {
          $stateProvider
              .state('login', {
                  url: '/login',
                  component: 'loginComponent'
              })
              .state('selfcare', {
                  url: '/',
                  component: 'selfCareComponent',
                  abstract: true
              })
              .state('selfcare.dashboard', {
                  url: 'dashboard',
                  component: 'dashboardComponent'
              })
              .state('selfcare.appHome', {
                  url: 'appHome/:id',
                  component: 'appHomeComponent'
              })
              .state('selfcare.serviceHome', {
                  url: 'serviceHome/:id',
                  component: 'serviceHomeComponent'
              })
      }
  
  })(angular.module('selfcare'));
  </code></pre>
  
  <p>And following is the <strong>run block</strong> for registering hooks on transitions:</p>
  
  <pre><code>(function(app) {
      'use strict';
      app.run(runFn);
  
      runFn.$inject = ['$rootScope', '$transitions' ,'$localStorage'];
  
      function runFn($rootScope, $transitions,  $localStorage) {
  
          $transitions.onStart({to:'**'}, function(transtion){
              $rootScope.ngProgress.start();
          })
  
          $transitions.onSuccess({to:'**'}, function(transtion){
              $rootScope.ngProgress.complete();
          })
  
         $transitions.onBefore({to:'login'}, function(transtion){
              if($localStorage.isLoggedIn &gt; Date.now()){
                  return transtion.router.stateService.target('selfcare.dashboard');
              }
          })
  
         $transitions.onBefore({to:'selfcare.**'}, function(transtion){
              if(!$localStorage.isLoggedIn || $localStorage.isLoggedIn &lt; Date.now()){
                  $localStorage.$reset();
                  return transtion.router.stateService.target('login');
              }
          })
      }
  
  })(angular.module('selfcare'));
  </code></pre>
  
  <p>I'm not able to figure out where am I doing wrong. Hooks are called once the app is stable and work correctly but on browser reload I can open any url and none of the hooks are called.</p>
  
  <p>Any help will be greatly appreciated. Thanks</p>