# How to html code from ts, plz

**URL:** <https://forum.ionicframework.com/t/how-to-html-code-from-ts-plz/54853>\
**Category:** ionic-v3\
**Created:** [June 15, 2016, 1:18am UTC](https://forum.ionicframework.com/t/how-to-html-code-from-ts-plz/54853 "2016-06-15T01:18:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arctushar](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@arctushar](https://forum.ionicframework.com/u/arctushar)\
**Post date:** [June 15, 2016, 1:18am UTC](https://forum.ionicframework.com/t/how-to-html-code-from-ts-plz/54853/1 "2016-06-15T01:18:12Z")

</div>

Hi  
I want to render html from ts. is it possible ? for example I want below code in html

```
This is image <img src="img/appicon.png"> shows various part of the human figure

```

and I want this should be in .ts variable like

`this.data="This is image <img src=\"img/appicon.png\"> shows various part of the human figure"`

But when I do it in html like {{data}} it shows  
`This is image <img src="img/appicon.png"> shows various part of the human figure`  
as text and not showing image. How can I do that ?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [June 15, 2016, 3:10am UTC](https://forum.ionicframework.com/t/how-to-html-code-from-ts-plz/54853/2 "2016-06-15T03:10:52Z")

</div>

Angular really doesn’t want you to do this. See [this issue](https://github.com/angular/angular/issues/7596).

---

<div class="post-metadata">

**Author:** ![arctushar](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@arctushar](https://forum.ionicframework.com/u/arctushar)\
**Post date:** [June 15, 2016, 2:44pm UTC](https://forum.ionicframework.com/t/how-to-html-code-from-ts-plz/54853/3 "2016-06-15T14:44:52Z")

</div>

[innerHTML]=“data” and it is working well.
