I want to set alertctl along with radio buttons dynamically in ionic 3
how I can do this?
home.ts
presentAlert() {
let alert = this.alertCtrl.create({
title: 'Low battery',
inputs:[
{
name:'radio 1',
label:'test',
value:'test',
type:'radio'
},
{
label:'new',
type: 'radio',
value:'new',
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
},
{
text: 'OK',
handler: (data:string) => {
console.log('OK clicked: '+data );
}
}
]
});
alert.present();
}
Expected Result: with dynamic data in alertctrl with radio buttons