I want to use Alert radio button to push a page using the if statement in Ionic 3

#1

presentPrompt() {
let alert = this.alertCtrl.create({
title: ‘Have units?’,
inputs: [{
type: ‘radio’,
label: ‘Yes’,
value: ‘0’
},
{
type: ‘radio’,
label: ‘No’,
value: ‘1’
}
],
buttons: [{
text: ‘Cancel’,
role: ‘cancel’,
handler: () => {
console.log(‘Cancel clicked’);
}
},
{
text: ‘OK’,
handler: (data: string) => {
console.log(‘OK clicked: Data ->’, JSON.stringify(data));

      if (value == 0) {

        this.navCtrl.push(UnidadePage);

      }
      ifelse(value == 1) {
        this.navCtrl.push(AmbientePage);
      } else {

        console.log("please click one option");

      }
    }
  }
]

});
alert.present();
}