Skip to content

ng坑汇总

1StepEngineer edited this page Aug 25, 2017 · 1 revision

ng-repeat中track by $index

Error: [ngRepeat:dupes]这个出错提示是指数组中有2个以上的相同内容。ngRepeat不允许数组中存在相同值
解决方法:在ng-repeat后增加track by $index

Clone this wiki locally