I have a table using ng-repeat, and inside of it a select that uses ng-options:
<tr ng-repeat="variable in variables">
<td>
<textarea ng-model="variable.extras">{{variable.extras}}</textarea>
</td>
<td>
<select ng-model="variable.condition" ng-options="text for text in toplevelTriggerConditions($index)">
</td>
For the select, that toplevelTriggerConditions($index)
call basically walks up the previous rows of the table, looks for various conditions, and if they pass grabs the value of that previous row's variable.extras
and then returns an array based on that. So if for the extras I put 'one,two,three' then the select has options of one, two, and three.
Visually this appears to work fine, but I'm getting a ton of $scope.infdig
errors. By googling I see it's because the array being used with ng-options is dynamic, not static, but I'm not sure how to get around this since the value of the array here has to dynamically change.
Hopefully this makes sense what I've tried to describe.