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

Function done

test/angular/1.5/angular.js:12064–12084  ·  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

12062 * - calls $apply
12063 */
12064 function done(status, response, headersString, statusText) {
12065 if (cache) {
12066 if (isSuccess(status)) {
12067 cache.put(url, [status, response, parseHeaders(headersString), statusText]);
12068 } else {
12069 // remove promise from the cache
12070 cache.remove(url);
12071 }
12072 }
12073
12074 function resolveHttpPromise() {
12075 resolvePromise(response, status, headersString, statusText);
12076 }
12077
12078 if (useApplyAsync) {
12079 $rootScope.$applyAsync(resolveHttpPromise);
12080 } else {
12081 resolveHttpPromise();
12082 if (!$rootScope.$$phase) $rootScope.$apply();
12083 }
12084 }
12085
12086
12087 /**

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected