Is it possible to add the ng-repeat $ index to the value of the ng-model directive?
<div class="row" ng-repeat="item in GiantList"> <input type="text" value="" ng-model="saveData.MyProperty+[$index+1]"> </div>
Ideally, this means that:
$ scope.saveData = [{"MyProperty1": "Bob"}, {"MyProperty2": "Sam"}, {"MyProperty3": "Chris"}]
I have tried every syntax combination that I can think of to no avail.
Thank you very much!
source share