What are the potential choices for the role
designation of a button within an Alert using the Ionic framework (v5)?
The official documentation only lists cancel
: https://ionicframework.com/docs/api/alert#buttons
If desired, a button can have a
role
property, likecancel
.
For instance:
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: (blah) => {
console.log('Confirm Cancel: blah');
}
}, {
text: 'Okay',
handler: () => {
console.log('Confirm Okay');
}
}
]