How check if checkbox is checked? And how sum a value?

#1

In a code like this, for example, how can I check if the checkboxes were checked and show an alert with the values’ sum? There will be more checkbox than those two.

< ion-list>

< ion-item>
< ion-label>Pepperoni< /ion-label>
< ion-checkbox [(ngModel)]=“pepperoni” value=“3.5”

< ion-item>
< ion-label>Sausage< /ion-label>
< ion-checkbox [(ngModel)]=“sausage” value=“4.2”< /ion-checkbox>
< /ion-item>

< ion-row center>
< ion-col text-center>
< ion-button click=“getValue()”>Value< ion-button>
< /ion-col>
< /ion-row>
< /ion-list>