(Angular 和 Ionic)我想從我的 alertcontoller 模式中添加一個指向 playstore 的鏈接。這可能嗎?
const alert = this.alrtCrtl.create({
title: `...`,
subTitle: `...`,
message: `<div > <img id='...' alt='...' />`,
buttons: [ {
cssClass: `cancel-button`,
text: `X`,
},
{
cssClass: `secure-hub`,
text: `Go To Play Store`, <<<<<<< this button
}
],
});
alert.present();
uj5u.com熱心網友回復:
您可以添加handler到可以呼叫該方法來打開您的 Playstore 鏈接的按鈕:
buttons: [ {
cssClass: `cancel-button`,
text: `X`,
},
{
cssClass: `secure-hub`,
text: `Go To Play Store`, //<<<<<<< this button,
handler: () => {
this.yourMethodToOpenUrl()
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/434801.html
標籤:有角度的 离子框架 超链接 uialert控制器
