angular-busy icon indicating copy to clipboard operation
angular-busy copied to clipboard

Supplying array of promises in options object notation results in infdig

Open c0bra opened this issue 10 years ago • 5 comments

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.

c0bra avatar May 29 '14 18:05 c0bra

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.

c0bra avatar May 29 '14 20:05 c0bra

i have the same problem. fix it! :)

selivandex avatar Jul 09 '14 20:07 selivandex

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.

cgross avatar Jul 09 '14 21:07 cgross

i have the same issue here , is it fixed or not yet please !

amerzur avatar Aug 18 '15 09:08 amerzur

schermannj avatar Jan 18 '16 10:01 schermannj