Home / Geral / Fix Angular error: ngRepeat:dupes Duplicate Key in Repeater
Geral

Fix Angular error: ngRepeat:dupes Duplicate Key in Repeater

Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: thing in mynotes, Duplicate key: string:xxxxx, Duplicate value: xxxxx
Um exemplo aplicado no Ionic com uma estrutura de repetição ng-repeat você pode adicionar track by $index <ion-item ng-repeat="thing in mynotes track by $index"> {{thing}} <ion-option-button style="width:200px;background:#ff0000;" class="button-assertive ion-trash-b" ng-click="remove(thing)"></ion-option-button> </ion-item>
A

Escrito por Admin

Autor e especialista em tecnologia publicando reflexões e conhecimentos sobre inovação e desenvolvimento.

← Post Anterior OXWall Hacking Theme Próximo Post → Testando aplicativos híbridos em um device real