* @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)
| 16869 | |
| 16870 | |
| 16871 | function when(value, callback, errback, progressBack) { |
| 16872 | var result = new Deferred(); |
| 16873 | result.resolve(value); |
| 16874 | return result.promise.then(callback, errback, progressBack); |
| 16875 | } |
| 16876 | |
| 16877 | /** |
| 16878 | * @ngdoc method |