I'm trying programmatically check check-box
in Ionic2
Type Script
Application, here is my page.ts
this.checkCheckBox();
with isChecked: boolean;
variable from constructor
load by default:
checkCheckBox()
{
this.isChecked = true;
}
and page.html
:
<ion-item>
<ion-label>Build</ion-label>
<ion-checkbox [checked]="!isChecked" [(ngModel)]="build" ></ion-checkbox>
</ion-item>
not sure what is wrong here, it is not checked
Aucun commentaire:
Enregistrer un commentaire