From b8960c3710f20a3c56ecc27f382b2500f6dc1e05 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 6 Jan 2012 19:17:31 -0800 Subject: chore($http): small $http fixes --- src/service/http.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/service/http.js') diff --git a/src/service/http.js b/src/service/http.js index aee079b8..fec4fc8d 100644 --- a/src/service/http.js +++ b/src/service/http.js @@ -118,8 +118,8 @@ function $HttpProvider() { var providerResponseInterceptors = this.responseInterceptors = []; - this.$get = ['$httpBackend', '$browser', '$exceptionHandler', '$cacheFactory', '$rootScope', '$q', '$injector', - function($httpBackend, $browser, $exceptionHandler, $cacheFactory, $rootScope, $q, $injector) { + this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector', + function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) { var defaultCache = $cacheFactory('$http'), responseInterceptors = []; @@ -134,8 +134,10 @@ function $HttpProvider() { * @name angular.module.ng.$http * @requires $httpBacked * @requires $browser - * @requires $exceptionHandler //TODO(i): still needed? * @requires $cacheFactory + * @requires $rootScope + * @requires $q + * @requires $injector * * @param {object} config Object describing the request to be made and how it should be processed. * The object has following properties: @@ -369,10 +371,7 @@ function $HttpProvider() { cachedResp = cache.get(config.url); if (cachedResp) { if (cachedResp.then) { - // cached request has already been sent, but there is no response yet, - // we need to register callback and fire callbacks when the request is back - // note, we have to get the values from cache and perform transformations on them, - // as the configurations don't have to be same + // cached request has already been sent, but there is no response yet cachedResp.then(removePendingReq, removePendingReq); return cachedResp; } else { -- cgit v1.2.3