I find myself in a peculiar situation - Behold the Controller snippet -
$scope.filterNum = {0: 'filterVal1', 1: 'filterVal2', 2: 'filterVal3', 3: 'filterVal4', 4: 'filterVal5', 5: 'filterVal6',
6: 'filterVal7', 7: 'filterVal8', 8: 'filterVal9', 9: 'filterVal10', 10: 'filterVal11', 11: 'filterVal12',
12: 'filterVal13', 13: 'filterVal14', 14: 'filterVal15', 15: 'filterVal16', 16: 'filterVal17', 17: 'filterVal18'};
$scope.operatorNum = {0: 'operatorVal1', 1: 'operatorVal2', 2: 'operatorVal3', 3: 'operatorVal4', 4: 'operatorVal5', 5: 'operatorVal6',
6: 'operatorVal7', 7: 'operatorVal8', 8: 'operatorVal9', 9: 'operatorVal10', 10: 'operatorVal11', 11: 'operatorVal12',
12: 'operatorVal13', 13: 'operatorVal14', 14: 'operatorVal15', 15: 'operatorVal16', 16: 'operatorVal17', 17: 'operatorVal18'};
$scope.getNumber = function(num) {
return new Array(num);
};
Now witness the HTML Snippet
<div class="row" ng-repeat="i in getNumber(18) track by $index">
<div class="col-md-3">
<select class="form-control" ng-model="filterNum[$index]">
<option ng-repeat="filter in filters" value="{{filter}}">{{filter}}</option>
</select>
</div>
Greetings {{filterNum[$index].value}}
</div>
My desire is simple - to display
Greetings (value selected in select control)
, yet the current expression fails to deliver.
I have looked into this issue based on another query found at this link