title: AngularJS $route.current is undefined
body: <p>I try to put <code>action</code> parameter in the <code>$routeProvider</code>. The problem is, I get <code>$route.current is undefined</code> error. Why ?</p>
  
  <pre><code>myApp.config(['$routeProvider', function($routeProvider){
      $routeProvider.when('/abc', {
                        ...
                        action: 'X'
                    })
  }]);
  
  myApp.run(['$rootScope', '$route', '$location', 'authService',
      function ($rootScope, $location, $route, authService) {
          $rootScope.$on('$routeChangeSuccess', function (currentRoute, previousRoute) {
              if ($route.current.action) {
                  $rootScope.action = $route.current.action;
              }
          });
     )]
  </code></pre>