In my code I have an ActionSheet with a number of buttons add programmatically by using the following code:
let actionSheet = ActionSheet.create({
title: 'Example',
});
this.neededButtons.forEach((nButton) => {
var button = {
text: nButton.text,
handler: () => {
console.log(nButton.name);
}
}
actionSheet.addButton(button);
});
this.nav.present(actionSheet);
My problem is, that this code was working but after one of the last updates of ionic 2 it isn’t working at the moment. All buttons are shown, but if I choose one of them nothing happens. There isn’t even an error message inside the console.
Can you help me? How I can make my code to work again? Thanks in advance!
Update: It has nothing to do with the fact, that the buttons are added programmatically. Even if I add them fix, there’s the same problem. The handlers don’t work.