I have a dynamic table that creates the amount of rows based on the user selection. Each row in the table then has input boxes for numbers. If I have a table with 7 rows for example, I want to store those 7 different inputs into an array. So far I am trying to pass the input of the textbox to a function which updates declared blank arrays. So something like this
HTML
<td id="{{'redScore'+($index+1)}}">
<input required="" ng-change="updateRedScore(inputValue)" ng-model="inputValue" type="number" step="1" name="rate" min="1" max="10"> </td>
Script
$scope.redRoundScore = [];
$scope.inputValue = null;
$scope.updateRedScore = function(passedscore){
$scope.redRoundScore[index] = passedscore
}
Is there a way I can pass the index alongside the inputValue to updateRedScore?
$indexas a second parameter on yourupdateRedScore()method? This is all inside anng-repeat, right?