Hi, i am new to Ionic and in Ionic 2
I need to select the radio selected value and need to set to the label value. Can you please help
Please check my code
HTML code
Gender
Select
Typescript
let alert = this.alertCntrl.create();
alert.setTitle(‘Select Gender’);
alert.addInput({
type: ‘radio’,
label: ‘Male’,
value: ‘Male’,
checked: true
});
alert.addInput({
type: ‘radio’,
label: ‘Female’,
value: ‘Female’,
checked: false
});
alert.addButton(‘Cancel’);
alert.addButton({
text: ‘OK’,
handler: data => {
this.radioResult = data;
console.log(“data”, this.radioResult);
this.gender = this.radioResult;
}
});
alert.present();
}