How to allow duplicates in ng-repeat?

I use stringify, and json gets the formatting and in the warning it comes. But in a real link it is not displayed. When I checked in the console, the error came, because "duplicates are not allowed in ng-repeat for the key."

Can anyone tell how to allow duplicates in ng-repeat so that formatted json is printed.

+4
source share
1 answer

Add 'track by $ index' to the repeater.

https://docs.angularjs.org/error/ngRepeat/dupes

+4
source

All Articles