MCPcopy
hub / github.com/mgonto/restangular / promiseGet

Function promiseGet

src/restangular.js:941–949  ·  view source on GitHub ↗
(what)

Source from the content-addressed store, hash-verified

939 }
940
941 function promiseGet(what) {
942 var deferred = $q.defer();
943 var filledValue = {};
944 this.then(function(val) {
945 filledValue = val[what];
946 deferred.resolve(filledValue);
947 });
948 return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue);
949 }
950
951 function resolvePromise(deferred, response, data, filledValue) {
952 _.extend(filledValue, data);

Callers

nothing calls this directly

Calls 1

restangularizePromiseFunction · 0.85

Tested by

no test coverage detected