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

Append html in ion-content

$
0
0

@NaseerAhmad wrote:

Hi everyone,

I’m tying to add html in my ionic modal’s ion-content which comes from admin dashboard but not yet succeeded any help is appreciated.
my HTML is

<p>Email to <button ion-button block icon-start (click)="sendMail('email@gmail.com')"><ion-icon name="mail"></ion-icon> email@gmail.com</button></p>
<p>&nbsp;</p>
<p>Call <button ion-button block icon-start (click)="callTel('123456789')"><ion-icon name=    "call"></ion-icon>123456789</button></p>

I’ve tried [innerHTML] and jquery’s append methods but in both cases only text is appeared button styles are not applied and functions are not called.

Also tried with pipe for safe HTML (using DomSanitizer).

transform(value: any, args?: any): any {
    return this.sanitizer.bypassSecurityTrustHtml(value);
  }

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49338

Latest Images

Trending Articles



Latest Images

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