[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify uni
2015-11-03 15:25
411 查看
[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify uniq
angularjs 使用ng-repeat报错[html] view
plaincopy
<div ng-init="words = ['高校','高校','高校']" ng-repeat="word in words">
{{word}}
</div>
[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys
发现是因为相同的内容重复引起,解决方案
[html] view
plaincopy
<div ng-init="words = ['高校','高校','高校']" ng-repeat="word in words track by $index">
{{word}}
</div>
在ng-repeat后面加上
[html] view
plaincopy
track by $index
相关文章推荐
- git版本升级
- css实现垂直居中6种方法
- firefox+linux+nginx搭建server与client通过证书双向认证环境
- tiledmap2
- mysql锁机制
- shell中uniq与sort -u 两种去重的对比
- 排序
- 配置Ruby环境和Sinatra框架
- java new空的集合
- UNIX Tutorial Three
- [国嵌攻略][047][MMU功能解析]
- “互联网+”货代,再不行动就OUT了
- 学习资料
- apt 指令使用
- HDU 4009——Transfer water——————【最小树形图、不定根】
- 协议Protocol
- 报错The constructor worker(int, String, float) is undefined
- 使用gulp安装智图压缩图片
- IOS 启动画面和图标设置(适配IOS7 and Xcode5)
- 初学Linux(2)