I know where the issue is, but so far my attempts to solve the problem were not successful. Any help is appreciated.
I am creating a table from JSON data in an ng-repeat loop. One of the table columns represents select boxes, which are of different values and sizes. This select statement is inside the ng-repeat block.
<tr ng-repeat="unit in unitsData">
<td>{{unit.unitName}}</td>
<td>{{unit.unitType}}</td>
<td>
<select class="form-control" ng-model="unit.unit" ng-options="option.value as option.name for option in getUnitListForUnitType(unit.unitType)"></select>
</td>
</tr>
I am getting this error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Based on Angular documentation for select boxes, the problem comes from getUnitListForUnitType function, which I created in the controller to return different lists based on the provided parameter. Not sure how this code could be corrected.