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

Function promiseCall

src/restangular.js:927–939  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

925 }
926
927 function promiseCall(method) {
928 var deferred = $q.defer();
929 var callArgs = arguments;
930 var filledValue = {};
931 this.then(function(val) {
932 var params = Array.prototype.slice.call(callArgs, 1);
933 var func = val[method];
934 func.apply(val, params);
935 filledValue = val;
936 deferred.resolve(val);
937 });
938 return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue);
939 }
940
941 function promiseGet(what) {
942 var deferred = $q.defer();

Callers

nothing calls this directly

Calls 1

restangularizePromiseFunction · 0.85

Tested by

no test coverage detected