(角度和离子)我想添加一个链接到playstore从我的警报控制模式。这个是可能的吗?
const alert = this.alrtCrtl.create({
title: `...`,
subTitle: `...`,
message: `<div class="image-container"> <img id='...' alt='...' />`,
buttons: [ {
cssClass: `cancel-button`,
text: `X`,
},
{
cssClass: `secure-hub`,
text: `Go To Play Store`, <<<<<<< this button
}
],
});
alert.present();发布于 2022-02-28 17:35:07
您可以将handler添加到按钮中,该按钮可以调用该方法来打开playstore链接:
buttons: [ {
cssClass: `cancel-button`,
text: `X`,
},
{
cssClass: `secure-hub`,
text: `Go To Play Store`, //<<<<<<< this button,
handler: () => {
this.yourMethodToOpenUrl()
}
}https://stackoverflow.com/questions/71298453
复制相似问题