Is there a way to globally resolve a service for all the routes in AngularJs?
Let's say I need to get configuration from a Web Service for all the routes. Can we do something like the following pseudo-code?
$routeProvider
.when('*', {
resolve: {
config: function(myConfigService) {
return MyConfigService.getConfigPromise();
}
}
})