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

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

时间:2015-09-16 20:02:52      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:

   采用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

标签:

原文地址:http://www.cnblogs.com/yxwkf/p/4814190.html

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