I\'m using ng-show
with an expression that resolves to a promise that resolves to a boolean. When I do this I get the 10 digest iterations overflow.>
If you check out the sources here you 'll see that the promise is resolved in nextTick
, so the $scope
only changes the next time angular makes a $digest
cycle. But your function returns a new promise on every $digest
cycle, never actually getting the resolved value of the previous promise.
It's an old problem discussed here also.
You can overcome this issue by keeping a "persistent" reference to your promise outside the function as I did here.