Having some trouble with minification and AngularJS ;-(
I found this jsfiddle \"loading\" extender for HTTP request, through the AngularJS Wiki page.
It work
As strange as it might seem, you can also use inline annotation where you do the actual .push() to inject your dependencies on $q and $window i.e. instead of pusing a function() into $httpProvider.responseInterceptors you push an array:
app.config(["$httpProvider", function($httpProvider) {
$httpProvider.responseInterceptors.push(['$q', '$window', function($q, $window) {
return function(promise) {
return promise.then(function(response) {
$("#loader").hide();
return response;
},
function(response) {
$("#loader").hide();
return $q.reject(response);
});
};
}]);
}]);