How to store checkbox values in Firestore

Hello, I’m trying to change firestore values checking boxes on Ionic 5, but don’t know how to deal with it, i need help, thank you.

That’s my code :slight_smile:


isSubscribed($event, id) {
console.log("Value checkbox: ", $, id)
subscribed: $


{{ subscriber.fullname }} Subscribed

You can do this. Follow this simple example:


<!-- Checkboxes in a List -->
  <ion-item *ngFor="let entry of form">
    <ion-checkbox slot="end" [(ngModel)]="entry.isChecked" (ionChange)="triggerEvent($event, entry.val)"></ion-checkbox>


public form = [
  { val: 'Pepperoni', isChecked: true },
  { val: 'Sausage', isChecked: false },
  { val: 'Mushroom', isChecked: false }

triggerEvent(event, value) {
    value: event.detail.checked

Hope it helps!

At the end only I “update” the “doc” and is working perfectly and fast :slight_smile: didn’t know about event.detail.checked jeje