mercredi 4 décembre 2019

Angular: how to manage a single checked box in a *ngFor

Hi there I've displayed a list of items with a checkbox in it.

I want the user to able to click this checkbox for only one of the item. It will uncheck the previously checked checkbox.

<tr *ngFor="let item of items>
 <td>
    <input type="checkbox value = "">
  </td>
</tr>

I've tried everything I knew but I cant make it. If I check a box, the other one will remain checked.

1- Is it possible to do what I want? 2- How can I do?




Aucun commentaire:

Enregistrer un commentaire