Hi ! i am using Action sheet to show a few options to user, at handler of one button i called a confirmation alert, confirmation alert shows up but its buttons do not work.
I have tried to call that confirmation alert from separate button and it works fine there.
Is it some sort of bug in ionic 2 ?
here is code for confirmation alert:
showConfirm() {
let confirm = this.alertCtrl.create({
title: 'Use this lightsaber?',
message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
buttons: [
{
text: 'Disagree',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Agree',
handler: () => {
console.log('Agree clicked');
}
}
]
});
confirm.present();
}
this is for action sheet:
presentActionSheet() {
let actionSheet = this.actionSheetCtrl.create({
title: 'Modify your album',
buttons: [
{
text: 'Destructive',
role: 'destructive',
handler: () => {
console.log('Destructive clicked');
**this.showConfirm();**
}
},
{
text: 'Archive',
handler: () => {
console.log('Archive clicked');
}
},
{
text: 'Cancel',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
}
]
});
actionSheet.present();
}
Any help will be appreciated. Thanks in advance