aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/http.js
diff options
context:
space:
mode:
authorIgor Minar2012-01-12 16:50:31 -0800
committerIgor Minar2012-01-13 14:28:20 -0800
commitb7f4d8c3c3c537f895d3cd7369f5b23ec94820e0 (patch)
tree7ab318844ac633a28b22af0bf3d697e0e7284119 /src/service/http.js
parent939c8e8fac0487da12e56291d69c5199a8ed9a30 (diff)
downloadangular.js-b7f4d8c3c3c537f895d3cd7369f5b23ec94820e0.tar.bz2
fix($http): anonnymous response interceptors should be treated as factories
Diffstat (limited to 'src/service/http.js')
-rw-r--r--src/service/http.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/service/http.js b/src/service/http.js
index f9a8d921..68f06de7 100644
--- a/src/service/http.js
+++ b/src/service/http.js
@@ -125,7 +125,11 @@ function $HttpProvider() {
responseInterceptors = [];
forEach(providerResponseInterceptors, function(interceptor) {
- responseInterceptors.push(isString(interceptor) ? $injector.get(interceptor) : interceptor);
+ responseInterceptors.push(
+ isString(interceptor)
+ ? $injector.get(interceptor)
+ : $injector.invoke(interceptor)
+ );
});