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()
For the people stuck with old code bases.
const _when = $routeProvider.when; $routeProvider.when = (path, route) => _when.call($routeProvider, path, { ...route, resolve: { ...route.resolve, 'currentUser': [ 'UserService', UserService => UserService.getCurrentUser() ] } });