我如何
join 2承诺有角度?
(我已经看到文档chain他们,但这不是我需要)
在Q中我想实现的例子:
Q.all([promiseA,promiseB]).done(function () { console.log("Both promises have been executed concurrently and then resolved"); });
使用$q.all()
$q.all([promise1,promise2]).then(function (result) { // result should be an array },function () { // call when either promise1 or promise 2 is rejected });