It might be easier than I imagine but I found it hard to get an answer googling..
i want to create a dumb component that gets an HTML element (actually another Component) as an @Input
-or some other way- to be able to ngFor
on.
If I was to write it down it'll look something like:
Parent component's HTML:
<dumb-comp [element]="<some-comp></some-comp>" [values]="collection"></dumb-comp>
Dumb component's HTML:
<"element" *ngFor="let value of values;let i = index"></"element">
I know i could pass a TemplateRef
as an Input and refer to it with attributes of Components like ng-bootstrap Tooltip, but i cant seem to figure out how to use that in my case.
Please let me know if I could make my question any clearer and thanks in advance