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

Function done

test/angular/1.7/angular.js:13328–13348  ·  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

13326 * - calls $apply
13327 */
13328 function done(status, response, headersString, statusText, xhrStatus) {
13329 if (cache) {
13330 if (isSuccess(status)) {
13331 cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]);
13332 } else {
13333 // remove promise from the cache
13334 cache.remove(url);
13335 }
13336 }
13337
13338 function resolveHttpPromise() {
13339 resolvePromise(response, status, headersString, statusText, xhrStatus);
13340 }
13341
13342 if (useApplyAsync) {
13343 $rootScope.$applyAsync(resolveHttpPromise);
13344 } else {
13345 resolveHttpPromise();
13346 if (!$rootScope.$$phase) $rootScope.$apply();
13347 }
13348 }
13349
13350
13351 /**

Callers 1

jsonpReqFunction · 0.70

Calls 3

isSuccessFunction · 0.70
parseHeadersFunction · 0.70
resolveHttpPromiseFunction · 0.70

Tested by

no test coverage detected