angular-busy
angular-busy copied to clipboard
Supplying array of promises in options object notation results in infdig
Check the plunker here: http://plnkr.co/edit/VO7K2eE7GmEp0UY9wmbi?p=preview
I have two promises that I want to use cg-busy="[ promise1, promise2 ]"
works fine, however cg-busy="{ promise: [ promise1, promise2 ] }"
gives an infdig (10+ $digest) error.
Looks like it only happens when using the array notation in the expression. If you do cg-busy="{ promise: promises }"
then it's fine. I guess it's because the interpolation creates a new array reference out of the expression and it's different each time it gets evaluated, thus throwing the $watcher into a loop.
i have the same problem. fix it! :)
Snide remarks aside, this is an issue with how Angular $watchCollection works. I cannot fix it. The array literal syntax inside a map in a cg-busy expression shouldn't be used.
i have the same issue here , is it fixed or not yet please !