I would like to resolve the promise that loads the current user for all the pages of my application. Currently I repeat the resolve in every $routeProvider.when()
$routeProvider.when()
I found that this case much better:
angular.extend({}, $routeProvider, { when: function(path, route) { route.resolve || (route.resolve = {}); route.resolve = angular.merge({}, route.resolve, { chef: 'OrganizationCheckerProvider' }); return $routeProvider.when(path, route); } });