Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

tags in interpolated text not working

$
0
0

@webroady wrote:

I’m working on an Ionic/Angular/Electron motd app. Message text retrieved from a server for display may contain links or other HTML. My question is how to get the links in interpolated message text treated as active/functional links instead of as dead text that does nothing?

Minimal HTML with message interpolation:

<ion-card *ngFor="let motd of motds">
  <ion-card-content>
    <ion-item>
      {{motd.message}}
    </ion-item>
  </ion-card-content>
</ion-card>      

Motd defs:

interface IMotd {
  messageId: number,
  title: string,
  message: string
}

motds: IMotd[] = [];    // Data retrieved from server in ngOnInit()

// Faked up test data from ngOnInit()
this.motds = [
  {messageId:1, title:"Title 1", message:"Message 1 <a href=\"https://www.google.com\">Google</a>"}
];

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



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