MCPcopy Index your code
hub / github.com/angular-ui/ui-router / done

Function done

test/angular/1.6/angular.js:12757–12777  ·  view source on GitHub ↗

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

(status, response, headersString, statusText, xhrStatus)

Source from the content-addressed store, hash-verified

12755 * - calls $apply
12756 */
12757 function done(status, response, headersString, statusText, xhrStatus) {
12758 if (cache) {
12759 if (isSuccess(status)) {
12760 cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]);
12761 } else {
12762 // remove promise from the cache
12763 cache.remove(url);
12764 }
12765 }
12766
12767 function resolveHttpPromise() {
12768 resolvePromise(response, status, headersString, statusText, xhrStatus);
12769 }
12770
12771 if (useApplyAsync) {
12772 $rootScope.$applyAsync(resolveHttpPromise);
12773 } else {
12774 resolveHttpPromise();
12775 if (!$rootScope.$$phase) $rootScope.$apply();
12776 }
12777 }
12778
12779
12780 /**

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected