最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
AngularJS 使用ng-repeat报错 [ngRepeat:dupes]
时间:2017-02-08 编辑:简简单单 来源:一聚教程网
AngularJS 使用ng-repeat报错
代码如下 | 复制代码 |
[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify uniq |
ng-repeat报错
代码如下 | 复制代码 |
{{word}} [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys |
发现是因为相同的内容重复引起,解决方案
代码如下 | 复制代码 |
{{word}} |
在ng-repeat后面加上
代码如下 | 复制代码 |
track by $index |
相关文章
- AngularJS监听路由变化的方法 06-02
- AngularJS表格添加序号的方法 05-18
- 利用angularjs1.4制作的简易滑动门效果 05-10
- AngularJS执行流程详解 04-14
- AngularJS入门教程:Helloworld 12-26
- AngularJS如何通过ng-route实现基本路由功能的教程 12-14