* @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)
| 18148 | |
| 18149 | |
| 18150 | function when(value, callback, errback, progressBack) { |
| 18151 | var result = new Promise(); |
| 18152 | resolvePromise(result, value); |
| 18153 | return result.then(callback, errback, progressBack); |
| 18154 | } |
| 18155 | |
| 18156 | /** |
| 18157 | * @ngdoc method |
no test coverage detected