In Ionic 2 we can use an actionsheet and add buttons, as follows:
let actionSheet = ActionSheet.create({
title: translate.instant("userdata.actionsheet.title"),
buttons: [
{
text: "text 2",
handler: () => {
get_image(1);
}
},
{
text: "text 1,
handler: () => {
get_image(2);
}
}
]
});
is it possible to add an ion-icon in a button?
If I do
text: ’ text 1 ’
the icon is not shown; instead, the webview shows the markup. The text attribute does not allow raw html.
Is there any way to achieve this?
I know I can add an css class to a button, but it’s not the same (and easy) as use the icon.