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

Function done

lib/test/angular/1.6.7/angular.js:12601–12621  ·  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

12599 * - calls $apply
12600 */
12601 function done(status, response, headersString, statusText, xhrStatus) {
12602 if (cache) {
12603 if (isSuccess(status)) {
12604 cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]);
12605 } else {
12606 // remove promise from the cache
12607 cache.remove(url);
12608 }
12609 }
12610
12611 function resolveHttpPromise() {
12612 resolvePromise(response, status, headersString, statusText, xhrStatus);
12613 }
12614
12615 if (useApplyAsync) {
12616 $rootScope.$applyAsync(resolveHttpPromise);
12617 } else {
12618 resolveHttpPromise();
12619 if (!$rootScope.$$phase) $rootScope.$apply();
12620 }
12621 }
12622
12623
12624 /**

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected