How to translate HTML string to real HTML element by ng-for in Angular 2?

Simplest solution:

<div [innerHTML]="some_string"></div>

Where some_string can be html code, e.g: some_string = "<b>test</b>".

No pipes or anything needed. Supported by Angular 2.0

Leave a Comment