Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229723

Deleting a user

$
0
0

So I tried what you said but I got stuck in one place i.e 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>


Viewing all articles
Browse latest Browse all 229723

Trending Articles