MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / done

Function done

code/songhop/www/lib/angular/angular.js:9596–9616  ·  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

9594 * - calls $apply
9595 */
9596 function done(status, response, headersString, statusText) {
9597 if (cache) {
9598 if (isSuccess(status)) {
9599 cache.put(url, [status, response, parseHeaders(headersString), statusText]);
9600 } else {
9601 // remove promise from the cache
9602 cache.remove(url);
9603 }
9604 }
9605
9606 function resolveHttpPromise() {
9607 resolvePromise(response, status, headersString, statusText);
9608 }
9609
9610 if (useApplyAsync) {
9611 $rootScope.$applyAsync(resolveHttpPromise);
9612 } else {
9613 resolveHttpPromise();
9614 if (!$rootScope.$$phase) $rootScope.$apply();
9615 }
9616 }
9617
9618
9619 /**

Callers 3

angular.jsFile · 0.70
jsonpReqFunction · 0.70
gulpfile.jsFile · 0.50

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected