2
AngularDart ng-repeat
指令似乎需要唯一值;例如,中如何使用AngularDart ng-repeat在可能带有重复项的简单值列表上使用
[NgErr50] ngRepeat error! Duplicates in a repeater are not allowed.
Use 'track by' expression to specify unique keys.
假设从某些外部源获得的串列表以及值的唯一性无法保证以下
<li ng-repeat="x in ['Alice', 'Bob', 'Alice']">...</li>
结果,如何能[NgErr50]
避免?
可能的重复[ng-repeat不能处理包含dupe的集合](http://stackoverflow.com/questions/20452223/ng-repeat-not-working-over-collections-that-contains-dupes) –