Is there anyway to append the ng-repeat $index to the value of a ng-model directive?
<div class="row" ng-repeat="item in GiantList">
<input type="text" value="" ng-model="saveData.MyProperty+[$index+1]">
</div>
Ideally, this would mean that:
$scope.saveData = [{ "MyProperty1" : "Bob" }, { "MyProperty2" : "Sam" }, { "MyProperty3" : "Chris" }]
I've tried every syntactical combination I can think of to no avail.
Many thanks!
I'm not sure I understood your question but try this :
saved[$index]['friend'+($index+1)]