Check check-box programmatically in Ionic2 TypeScript Application

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:

    this.isChecked = true;

and page.html:

    <ion-checkbox [checked]="!isChecked" [(ngModel)]="build" ></ion-checkbox>

not sure what is wrong here, it is not checked

You have the check box set to be checked when isChecked is false.

The other issue is that [checked] and [(ngModel)] don’t play well together, and so you should only have one of them.


@SigmundFroyd Thank you