MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / done

Function done

lib/test/angular/1.7.0/angular.js:12759–12779  ·  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

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

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected