- .ts*
private async openUpdatedTermsOfServiceAlert(): Promise<void> {
const alert = await this.alertController.create({
header: 'Updated Terms of Service',
//issue is 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();
}
你能告诉我如何添加click()
事件处理程序吗?我试过很多次。但还没找到。
`new IonicSafeString(`<ion-button fill="clear">Clear</ion-button>`),`
我看到了这个反馈。但是不清楚如何使用上面的用例来实现。这里有什么帮助吗?
参考:https://github.com/ionic-team/ionic-framework/issues/25584#issuecomment-1183277927
1条答案
按热度按时间yrdbyhpb1#