daniel daniel - 3 months ago 16
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>