if you want return new collection, you just need to save javascript links.
I wrote factory for this case:
app.factory('linker', function () {
var links = {}
return function (arr, key) {
var link = links[key] || []
arr.forEach(function (newItem, index) {
var oldItem = link[index]
if (!angular.equals(oldItem, newItem))
link[index] = newItem
})
link.length = arr.length
return links[key] = link
}})
you can see here how it works:
http://plnkr.co/edit/2Uc5zsFgVnK3ltHOUUQx?p=preview
--
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.