* @ngdoc method * @name $q#when * @kind function * * @description * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. * This is useful when you are dealing with an object that might or might not be a promise, or if * the promise comes fr
(value, callback, errback, progressBack)
| 17345 | |
| 17346 | |
| 17347 | function when(value, callback, errback, progressBack) { |
| 17348 | var result = new Promise(); |
| 17349 | resolvePromise(result, value); |
| 17350 | return result.then(callback, errback, progressBack); |
| 17351 | } |
| 17352 | |
| 17353 | /** |
| 17354 | * @ngdoc method |
no test coverage detected