码迷,mamicode.com
首页 > 其他好文 > 详细

ng-repeat循环输出出现Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique

时间:2014-12-22 12:59:55      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:angularjs

   使用ng-repeat循环输出对象的时候出现如下错误:

Duplicates in a repeater are not allowed. Use ‘track by‘ expression to specify unique keys. Repeater: c in shopCount, Duplicate key: undefined:undefined



应该在循环是加以下代码    ng-repeat item in items track by $index

ng-repeat循环输出出现Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique

标签:angularjs

原文地址:http://blog.csdn.net/u013440660/article/details/42077787

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!