javascript - AngularJS Error: [$rootScope:infdig] 10 $digest() iterations reached -
i have 2 functions in angularjs controller file:
function1(param1, param2) { var relevantobjects = []; // work return relevantobjects; } function2(relevantobjects) { var containedtimerangeobjectarray = []; // work return containedtimerangeobjectarray; }
the angularjs code in html looks this:
<span ng-repeat="containedtimerangeobject in vm.function2(vm.function1(param1, param2))"> {{containedtimerangeobject.type}} {{containedtimerangeobject.percentage}} </span>
the problem model not become stable because in function2() new array generated @ every invocation , function1() invoced because model has chanced , on (thats guess)
my question how solve problem? use function1() without function 2 way:
<span ng-repeat="containedtimerangeobject in vm.function1(param1, param2)"> {{containedtimerangeobject. ...}} {{containedtimerangeobject. ...}} </span>
and works fine. thankful wor hint how solve issue. lot!
Comments
Post a Comment