aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service/http.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/service/http.js b/src/service/http.js
index bdf55937..e6a42b65 100644
--- a/src/service/http.js
+++ b/src/service/http.js
@@ -83,11 +83,18 @@ function $HttpProvider() {
var responseInterceptors = this.responseInterceptors = [];
- this.$get = ['$httpBackend', '$browser', '$exceptionHandler', '$cacheFactory', '$rootScope', '$q',
- function($httpBackend, $browser, $exceptionHandler, $cacheFactory, $rootScope, $q) {
+ this.$get = ['$httpBackend', '$browser', '$exceptionHandler', '$cacheFactory', '$rootScope', '$q', '$injector',
+ function($httpBackend, $browser, $exceptionHandler, $cacheFactory, $rootScope, $q, $injector) {
var defaultCache = $cacheFactory('$http');
+ forEach(responseInterceptors, function(interceptor, index) {
+ if (isString(interceptor)) {
+ responseInterceptors[index] = $injector.get(interceptor);
+ }
+ });
+
+
/**
* @ngdoc function
* @name angular.module.ng.$http