I’m trying to create a dynamic list with checkbox using *ngFor
. Here, i want that the checkbox can be checked only one at a time (if user clicks the 2nd checkbox previously selected one should go unchecked).
<div class="img-prev col-md-12" *ngFor="let imgList of uploadedImg; let i = index">
<div class="col-md-1">
<input [ngModel]= "selectImg" (click)="updateSelection(i, imgList)" type="checkbox" />
</div>
</div>