I’m working on tags to be used in typescript on ionic 3. Here is the test code:
modalTest() {
console.log('here');
let data = "this is test <p> This is test </p>"
alert(data);
}
This is showing alert as it is written, but i want to show this in proper html form. Need help on this one.
Thank you.
Yogos
2
Like this and you can add css custom with class alert-html
constructor(private alertCtrl: AlertController){}
modalTest(){
let alert = this.alertCtrl.create(
{
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
}
}, {
text: 'Ok',
handler: () => {
}
}
]
}
);
alert.setCssClass("alert-html");
alert.setTitle('');
alert.setMessage("this is test <p> This is test </p>");
alert.present(alert);
}