标签: angularjs-infdig

具有ng-repeat函数的AngularJS InfDig错误(无限循环),返回对象数组

这是我的代码:

<h1 ng-repeat="item in func()">something</h1>

$scope.func = function(){
  return [{"property" : "value1"},{"property": "value2"}];
}
Run Code Online (Sandbox Code Playgroud)

在Angular.js v.1.1.1中,没有错.在Angular.JS v 1.2.1中,我得到了一个infDig错误.

v.1.1.1的小提琴

v.1.2.1的小提琴

你能解释一下这种情况吗?非常感谢.

infinite-loop angularjs angularjs-ng-repeat angularjs-infdig

7
推荐指数
1
解决办法
8880
查看次数