fwiw I went ahead and filed issue #6041<https://github.com/angular/angular.js/issues/6041> .
On Monday, January 27, 2014 10:01:47 AM UTC-8, Nikita Tovstoles wrote: > > Would like a 2nd pair of eyes from the community before filing a bug: > please see demo <http://plnkr.co/edit/WXGn5LaoiJmLzJ8rMImQ?p=preview>. > > Docs for $watchCollection 's listener say: > > listener a callback function that is >> * fired with both the `newCollection` and `oldCollection` as >> parameters. >> * The `newCollection` object is the newly modified data >> obtained from the `obj` expression >> * and the `oldCollection` object is a copy of the former >> collection data. > > > In my demo I see: > > 1. oldCollection always .equals() newCollection - even when array is > mutated or replaced altogether > 2. oldCollection !== newCollection on first invocation - unlike in > $watch. IMO behavior should be consistent between the two methods and on > first invocation oldCollection must be === newCollection - to be able to > easily tell that it is - in fact - first invocation > > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
