This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Description
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 (http://plnkr.co/edit/WXGn5LaoiJmLzJ8rMImQ?p=preview - open JS console) I see:
- (bug) oldCollection always .equals() newCollection - even when array is mutated or replaced altogether
- (perhaps design flaw) 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