1

I would like to bind the variable with HTML syntax into a template. However, it seems the inner-html directive does not work in the angular 2.0.0-beta.0. For example:

<p [inner-html]="item.content"></p> 

What is the new alternative way or syntax in angular 2.0.0-beta.0?

Wenyan
  • 273
  • 4
  • 12

1 Answers1

1

In alpha.52 Angular templates were changed to be case-sensitive and with this the selectors of all directives.

Use instead

<p [innerHTML]="item.content"></p>

see also https://github.com/angular/angular/blob/master/CHANGELOG.md#200-alpha52-2015-12-10

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567