Greetings! I am currently working on a table that adjusts its rows based on specific conditions.
<table id="totBudget">
<thead>
<tr>
<th></th>
<th>CC_1</th>
<th>CC_2</th>
<th>CC_3</th>
<th>CC_4</th>
<th>Total</th>
<th>CC_NAME</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of source; let i= index">
<td>{{item.name}}</td>
<td><input type="text" class="{{item.value}}1" id="{{item.value}}1"></td>
<td><input type="text" class="{{item.value}}2" id="{{item.value}}2"></td>
<td><input type="text" class="{{item.value}}3" id="{{item.value}}3"></td>
<td><input type="text" class="{{item.value}}4" id="{{item.value}}4"></td>
<td><input type="text" class="{{item.value}}tot" id="{{item.value}}tot"></td>
<td><input type="text" class="{{item.value}}cc" id="{{item.value}}cc"></td>
</tr>
</tbody>
</table>
I'm looking to generate a dynamic ngModel with the same name as the id mentioned in each row, for example: {{item.value}}1. I'm unsure of how to create an ngModel for all inputs that rely on item.value and the table row. Any suggestions would be greatly appreciated!