i used nested ng-repeat to display my data in html page.
it is throwing an error
Error: Error: 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations
but this error doesn't affect my functionality.i was searching for an answer for this problem but i didn't get the correct answer thats y i posted this question here.
i didn't know whether my json data structure causes this error, but i can't change its structure.
here is my sample json data
//In controller
for (var i = 1; i <= 31; i++) {
$scope.daysofmonth.push({day:i}); // daysofmonth.day->1,2,3...
}
for(var j=0; j<$scope.daysofmonth.length; j++) {
$scope.daysofmonth[j].events = [ // creating 31 arrays for events
{"name":"T", "count":0,"data":[{
"startDate":"01/25/2013",
"startTime":"00:00",
"endDate":"01/26/2013",
"endTime":"00:00",
"type":"m",
"status":"Not Started",
"title":"Demo to Client",
"description":"Application demo"
}]},
{"name":"I", "count":0,"data":[...]} // same as previous
];
//left some of the business logic
}
//In html file
<div class="{{box | today:year+'-'+month+'-'+dayofmonth.day:dayofmonth.day}}" ng-repeat="dayofmonth in daysofmonth" >
<span class="days">{{ dayofmonth.day }}</span>
<span class="events-list">
<div ng-repeat="eve in dayofmonth.events" >
{{ eve.count + eve.name }}
</div>
</span>
</div>
can anyone tel me what causes this error and how to resolve it?
That JSON is not valid. Also, your template is not going to output anything visible unless you put some bind tags in the repeater like {{ Company.Company.id }} for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With