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

How do I dynamically add html to template from a class variable

$
0
0

@rwillems wrote:

I’m trying to write a large set of html text related to a custom widget to one of my tabbed pages. The set looks like “<div id=‘myTableDivSet’ style= …”. To keep it simple, assume all I want to write is

Hello world!

(but know that the set of html text is large). I can get it to the page but it writes it there as a string, not as html. The type of the text in my *.ts file is string. I also tried making it the “any” type but that didn’t help. I use {{helloStr}} in my template like this:
{{helloStr}}

What I get is:

**"**

Hello world!

**"**

If it would have left off the quotes before

and after

I would have been happy.

I’m using a relatively new version of Ionic. I am fairly new to Ionic and I did a fair amount of googling to try to find an answer but didn’t succeed. Thanks in advance for any help you can provide.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49259

Trending Articles