Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49215

How can I put clickable span on alertcontroller's message

$
0
0

@pdj wrote:

Hello I have html span clickable which is shown as m in below.
I thought I would be work out well, but it cause error on developer log on chrome
saying WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).

I imported { DomSanitizer } from ‘@angular/platform-browser’;
but nothing happened…
How can I implement span clickable inside of alertcontroller?

for(var i=0; i<this.dutylist[0].length; i++){
m+="<span (click)='haha()'>"+this.dutylist[0][i]+"</span>"+'<br><br>';
}
console.log("m is ");
console.log(m);
    var message = this.dutylist[0]
    let alert = this.alertCtrl.create({
      title: '등록된 휴무표시',
      message: m,
      buttons: [
        {
          text: '확인',
          handler: data => {
          }
        }
      ]
    });
    alert.present();

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>