I load the User Id from the database(rest api) and then I used ion check box to select the user whom i want to delete but as I have all the users param same i.e uid, when I use ngmodel to get the value of the selected item all the items are selected just because of “uid”. So how can i select only one user and get the uid value??
below is my code:
<ion-header>
<ion-navbar>
<ion-title>Delete User</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<div *ngFor="let obj of response1Obj; let i = index">
<ion-item>
<ion-label>User ID: {{obj.uid}}</ion-label>
<ion-checkbox [(ngModel)]="uid" color="Royal"></ion-checkbox>
</ion-item>
</div>
<div>
<button ion-button (click)="delUser();" style="text-align:center;">Delete</button>
</div>
</ion-content>