When i select a checkbox in a row, It selects all the checkbox available in table. Here is the code i have used for populating checkbox in a table
<thead>
<tr>
<th scope="col">Attach</th>
<th scope="col">Link</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let list of complianceReports.selectedData;let i = index">
<td>
<input id=" " type="checkbox" name="attach[$index]" class="setup-checkbox" [(ngModel)]="complianceReports.attach[$index]">
</td>
<td>
<input id="complianceReports.link[$index]" type="checkbox" name="link[$index]" class="setup-checkbox" [(ngModel)]="complianceReports.link[$index]">
</td>
</tr>
</tbody>
How to select checkbox in a row as per need in angular 7
Aucun commentaire:
Enregistrer un commentaire