Issue
(Angular & Ionic) I would like to add a link to the playstore from my alertcontoller modal. is this possible?
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();
Solution
You can add handler
to your button that can call the method to open your playstore link:
buttons: [ {
cssClass: `cancel-button`,
text: `X`,
},
{
cssClass: `secure-hub`,
text: `Go To Play Store`, //<<<<<<< this button,
handler: () => {
this.yourMethodToOpenUrl()
}
}
Answered By - Misha Mashina
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.