[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify uniq
ng-repeat報錯html
1 <div ng-init="words = ['高校','高校','高校']" ng-repeat="word in words"> 2 {{word}} 3 </div>
1 [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys
發現是由於相同的內容重複引發,解決方案express
在ng-repeat後面加上spa
1 track by $index
1
|