repeat directive outputing wine records from an api. I have a factory function to serve up the wine API which is then accessed in my controller
app.factory(
It is true that AngularJS uses keys to associate DOM nodes with items. So, you can solve by adding "track by $index"
.
It will look like this
ng-repeat="wine in wines track by $index"
Occurs if there are duplicate keys in an ngRepeat expression. Duplicate keys are banned because AngularJS uses keys to associate DOM nodes with items.
This means that $scope.wines have some values which are duplicate.
You can also refer this post : Angular ng-repeat Error "Duplicates in a repeater are not allowed."