angularjs ng1 ng-repeat 遍历重复数据保存问题 Duplicates in a repeater are not allowed
报错:
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: user in users, Duplicate key: number:1。
解决办法:
old:
ng-repeat="item in list"
new: 添加 track by $index
ng-repeat="item in list track by $index"
亲测可行