title: angularjs app.run doesn't get called with state
body: <p>I can't see the problem at all, here's my code.</p>
  
  <pre><code>var app = angular.module('application', ['ui.router', 'ngResource','user.controllers','user.services']);
  
  app.config(function ($stateProvider, $urlRouterProvider) {
  
    $stateProvider.state('home', {
      url: '',
      templateUrl: 'views/home.html'
  
    }).state('account', {
      url: '/account',
      templateUrl: 'views/user/account.html',
      controller: 'UserCtrl'
  
    }).state('login', {
      url: '/login',
      templateUrl: 'views/user/login.html',
      controller: 'UserCtrl'
  
    }).state('logout', {
      url: '/logout',
      templateUrl: 'views/user/logout.html',
      controller: 'UserCtrl'
  
    }).state('register', {
      url: '/register',
      templateUrl: 'views/user/register.html',
      controller: 'UserCtrl'
    });
  });
  
  
  app.run(function ($rootScope, $state) {
    $rootScope.$on("$stateChangeStart", function (event, toState, toParams, fromState, fromParams) {
      console.log('toState.name: ' + toState.name);
      console.log('fromState.name: ' + fromState.name)
    });
  });
  </code></pre>
  
  <p>It seems pretty straightforward to do, but it just doesn't work. I'm sure it's a little thing I don't know about Angular, so any help would be appreciated.</p>
  
  <p>Thank you!</p>