假设我在angular.js app中注册了几个HTTP拦截器:
nil
他们将以何种顺序执行?
答案 0 :(得分:9)
似乎执行了拦截器:
日志:
$httpProvider.interceptors.push(function() {
return {
request: function(config) {
console.log("interceptor A request");
return config;
},
response: function(res) {
console.log("interceptor A response");
return res;
}
};
});
$httpProvider.interceptors.push(...); // interceptor B with similar code
$httpProvider.interceptors.push(...); // interceptor C with similar code