Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binding value as html in stenciljs

I am having trouble rendering a value with custom html inside into an element. ex:

this.title = 'Hello <b> stencil </b>'; << response value from an API 

Binding:

<h1>{this.title}</h1>

I am expecting something same as innerHtml behavior in JavaScript.

like image 876
Mohamad Al Asmar Avatar asked Apr 23 '18 14:04

Mohamad Al Asmar


1 Answers

You can use

<h1 innerHTML={this.title} />
like image 74
Jag Reehal Avatar answered Sep 29 '22 11:09

Jag Reehal