daniel daniel - 1 month ago 4x
Javascript Question

Add html in *ng-for loop in angular 2

I want to add html code from a variable inside a for loop in angular 2:

<li *ng-for="#c of myHtmlItems">

The html is only added as a string

kit kit

you could do:

    <li *ng-for="#c of myHtmlItems" inner-html="{{c.myHtml}}></li>