async presentAlertRadio(heading:string){
const alert = await this.alertCtrl.create({
header: heading,
inputs :[
{
name : 'Radio 1',
type: 'radio',
label: 'Radio 1',
value: 'value1',
checked: true
},
{
name: 'radio2',
type: 'radio',
label: 'Radio 2',
value: 'value2'
},
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Ok',
handler: (data) => {
console.log('Confirm Ok', data);
}
}
]
});
await alert.present();
}
Я хочу назначить значение выбранного радио в моем контроллере оповещений переменной, как я могу получить к нему доступ.
плохо знаком с ionic 4, так что не знаю
я хочу назначить мою переменную x = selectedRadio