I am trying to compare an object included within a repeater to an object just returned from the server.
Because the repeated object contains the hashkey property angular.equals evaluates to false.
I guess i could just delete the property but i don't know if their is an angular way to handle this.
thanks
There is an angular way to handle this. You need to track by a unique field that each object has. For example instead of:
item in items
Do:
item in items track by item.id
Checkout angular's documentation regarding ngRepeat and $$hasKey
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With