* @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)
| 17574 | |
| 17575 | |
| 17576 | function when(value, callback, errback, progressBack) { |
| 17577 | var result = new Promise(); |
| 17578 | resolvePromise(result, value); |
| 17579 | return result.then(callback, errback, progressBack); |
| 17580 | } |
| 17581 | |
| 17582 | /** |
| 17583 | * @ngdoc method |
no test coverage detected