How to Active and diactive toogle button based on value

How to Active and diactive toogle button based on value.

Like value 0 means directive and 1 Means active , how can I implement ?
Please help me out
Thanks

    <ion-toggle checked="true" [(ngModel)]="this.toggle" (ionChange)="notify($event)"></ion-toggle>

notify() {
console.log(this.toggle);
if (this.toggle == true) {
this.togglex = “1”;
}
else{
this.togglex = “0”;
}
}

fetching from database
if (this.togglex == “1”) {
this.toggle = true;
}
else {
this.toggle = false;
}