Search code examples
htmlangular-dart

Angulardart show HTML String


This question is probably really stupid but i really searched a lot for it, but I may be using the wrong keywords.
I have a String with <hr> and I want Angular to display a horizontal line.
The HTML is converted to <hr> and therefore displayed as text <hr> on the page. How can I achieve this that the HTML tags are not converted by angular?
I have done this in Angular 6 with TS and there it was no problem, is there a pipe or something else, which I have to use?


Solution

  • Binding to [innerHtml] should do that.

    <div [innerHtml]="fieldInComponentClassWithHtml"