Joined December 2012
·

Antoine RICHARD

Javascripter
·
Nantes, France
·
·
·

Nice trick!

Minor enhancement:

$rootScope.$on("$routeChangeSuccess", function(event, currentRoute, previousRoute) {
    $rootScope.title = currentRoute.title;
});

This way you do not have to inject $route in run().
Note that the $routeChangeSuccess event takes 3 parameters.

Achievements
61 Karma
0 Total ProTip Views
Interests & Skills