0

I have some collection of objects, in which each object has the following property:

{
...
component: '<example-component></example-component>'
}

And in my *ngFor directive, I have the following:

<div *ngFor="let item of items">
   <div [innerHTML]="item.component">
   </div>
</div>

However, this seems not to inject the component. Am I doing something wrong here?

Btw, If I change the component to SVG (which is basically what I want to achive), it doesn't render as well.

uksz
  • 18,239
  • 30
  • 94
  • 161

0 Answers0