Determining if checkbox is checked in Ionic 2
angular, checkbox, ionic2
Solution
Just use an NgModel
<ion-checkbox checked="false" [(ngModel)]="yourVariable.checked"></ion-checkbox>
Problem
How can I determine if a ion-checkbox is checked in Ionic 2. ``` <ion-item *ngFor="let a of q.Answers"> <ion-label>{{a.AnswerDescription}}</ion-label> <ion-checkbox (click)="addValue($event)"></ion-checkbox> </ion-item> ``` the following return `undefined` ``` addValue(e): void { var isChecked = e.currentTarget.checked; console.log(isChecked);//undefined } ```