.ts
private async displayTermsOfServiceAlert(): Promise<void> {
const alert = await this.alertController.create({
header: 'Updated Terms of Service',
//problem lies here
message:
new IonicSafeString(`<ion-button id="terms-of-service">Clear</ion-button>`),
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: (): void => {},
},
{
text: 'Continue',
handler: (): void => {},
},
],
mode: 'ios',
cssClass: 'play-next',
backdropDismiss: false,
});
await alert.present();
}
Is there a way to add click()
event handler for this? I've tried different methods without success so far.
`new IonicSafeString(`<ion-button fill="clear">Clear</ion-button>`),`
I came across some feedback regarding this issue. However, it's not clear how to implement it in the given scenario. Any guidance would be appreciated.
Reference: https://github.com/ionic-team/ionic-framework/issues/25584#issuecomment-1183277927