Quantcast
Channel: Render html string within a template using interpolation? - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by penleychan for Render html string within a template using...

You need to pass your [innerHTML] as a string wrap it with single quotes, <div [innerHTML]="'<b>test here</b>'"></div>

View Article



Answer by omeralper for Render html string within a template using...

You shoud write the parameter as a string. <div [innerHTML]="'test here'"></div>

View Article

Render html string within a template using interpolation?

Using Angular 4.3.0 Say I have a string like this that is a property of a component. <p>test#2 bla bla</p><p>test1234 56</p><p>test test</p> So, Im following along...

View Article

Answer by Kristjan Johanson for Render html string within a template using...

Or if u want to use the parameter:<div [innerHTML]="test.message"></div>

View Article
Browsing all 4 articles
Browse latest View live




Latest Images