当所有链条都解决后,我希望所有人解决。
当然,然后将每个链的承诺传递给
all()而不是最初的承诺:
$q.all([one.promise, two.promise, three.promise]).then(function() { console.log("ALL INITIAL PROMISES RESOLVED");});var onechain = one.promise.then(success).then(success), twochain = two.promise.then(success), threechain = three.promise.then(success).then(success).then(success);$q.all([onechain, twochain, threechain]).then(function() { console.log("ALL PROMISES RESOLVED");});
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)