$q.all Returns Undefined For All Values
I'm trying to wait on 3 promises but $q.all appears to resolve them at once and returns undefinedfor each single value, I can't figure out why: this.doWork = function() { var def
Solution 1:
You should not be doing .promise
on promise
object returned by get
method, because you had already returned promise
form get
method.
$q.all([a, b, c])
When you're doing
a.promise
,b.promise
&c.promise
they all becomesundefined
& then$q.all
array become$q.all([undefined, undefined, undefined])
passing them to$q.all
will giveundefined
result.
Post a Comment for "$q.all Returns Undefined For All Values"