Add link in alert controller

Hi Folks,

I want to perform below action in ionic alert :

title : “some title”,
message :"<a (click)=“callFunc()”>Click me! ",
buttons :[‘Close’]
}).present().then(() => {

console.log(“function called”);

How can I achieve this?
I tried this snippet but i am not able to call function on href click!


Make your own modal and style it like the alert, that allows you to have links in it. It shouldn’t be to hard and when you have your own alert you can do everything with it that you ever wanted, links, a big icon or basically everything else that can fit in a modal.

So I have to change my alert controller to modal ?

And this code would normally/theoretically throw an error, because you need to use 'when you already using " for the outside. Or escape the inside " with \".

Yes you basically write your own alert.
They should be some information about that on this forum, your not the first one who wanted to use html in alerts.

Thank you! Will try with this approach!