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

Function done

test/angular/1.2/angular.js:8468–8480  ·  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

8466 * - calls $apply
8467 */
8468 function done(status, response, headersString, statusText) {
8469 if (cache) {
8470 if (isSuccess(status)) {
8471 cache.put(url, [status, response, parseHeaders(headersString), statusText]);
8472 } else {
8473 // remove promise from the cache
8474 cache.remove(url);
8475 }
8476 }
8477
8478 resolvePromise(response, status, headersString, statusText);
8479 if (!$rootScope.$$phase) $rootScope.$apply();
8480 }
8481
8482
8483 /**

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolvePromiseFunction · 0.70

Tested by

no test coverage detected