Not sure what is going on here, if you click the Test button, you'll see "Error: $digest already in progress"
Something about <tr ng-repeat="row in getRows(tableState)"> seem to cause this.
<tr ng-repeat="row in getRows(tableState)">
Also, why is getRows() called 11 times per click of the Test button?
This throws too many iterations exceptions which then leaves the scope in inconsistent state. The exception got eaten and so it was never shown. The already in progress is a symptom of the original bug
fix($rootScope): TTL exception does not clear $$phase
When $digest() throws infinite digest exception it
does not properly clear the $phase leaving the scope
in an inconsistent state.
Hi, I guess the second question is then, why would the above example trigger an infinite loop?
ng-repeat requires stable array elements. Which means that every time you look at the array, the array element have to be same instances. in your case you create a new instance on each iteration.