MCPcopy
hub / github.com/angular-ui/ui-router / done

Function done

test/angular/1.3/angular.js:9707–9727  ·  view source on GitHub ↗

* Callback registered to $httpBackend(): * - caches the response if desired * - resolves the raw $http promise * - calls $apply

(status, response, headersString, statusText)

Source from the content-addressed store, hash-verified

9705 * - calls $apply
9706 */
9707 function done(status, response, headersString, statusText) {
9708 if (cache) {
9709 if (isSuccess(status)) {
9710 cache.put(url, [status, response, parseHeaders(headersString), statusText]);
9711 } else {
9712 // remove promise from the cache
9713 cache.remove(url);
9714 }
9715 }
9716
9717 function resolveHttpPromise() {
9718 resolvePromise(response, status, headersString, statusText);
9719 }
9720
9721 if (useApplyAsync) {
9722 $rootScope.$applyAsync(resolveHttpPromise);
9723 } else {
9724 resolveHttpPromise();
9725 if (!$rootScope.$$phase) $rootScope.$apply();
9726 }
9727 }
9728
9729
9730 /**

Callers 3

angular.jsFile · 0.70
jsonpReqFunction · 0.70
angular-animate.jsFile · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected