How to default a ion-toggle to on?


I am using an ion-toggle in Ionic 2, that I would like to default to on. I have tried the checked attribute, but it still defaults to off.

<ion-toggle [(ngModel)]="" formControlName="contact" id="contact" checked="true">Contactable</ion-toggle>

How do I default a ion-toggle to true or on?




In your Component code, set the property to true: = true;