I am confused why ng-repeat is giving me duplicates error. I can solve it using track by $index but I want to know when this error is thrown by angular.
This is clear
<div ng-repeat="a in [1,1,1,1]">...</div>
As there are duplicates value in above array, it will definitely throw an Dups error.
What about list of objects
<div ng-repeat="a in items">...</div>
JS
$scope.items = [
{"ab":1,"bc":3},
{"ab":1,"bc":3}
]
How does angular treats/compare second one to decide whether there are duplicate values or not?
Thanks.
EDIT
Why I am not getting duplication error?