I'd want the ngfor to use one child component per iteration :
Card component, <card>
:
<div *ngFor="let item of items">
<ng-content [value]="item">
</ng-content>
</div>
Use of the card component :
<card>
<child-comp1> Hello </child-comp1>
<child-comp2> Goodbye </child-comp2>
<child-comp3> See you </child-comp3>
...
</card>
Expected result :
<card>
<child-comp1> Hello item1</child-comp1>
<child-comp2> Goodbye item2</child-comp2>
<child-comp3> See you item3</child-comp3>
...
</card>
Of course there should be as much child components as data in the ngFor array for it to work correctly.
EDIT : the above exemple doesn't represent the actual datas and components used, it is only here to illustrate and explain the question. There could be more or less than 3 child components and they are more complex than just displaying values.
I will try to help you.
First of all I created a main class that will call all the card components. main.component.html
main.component.ts you only need to have your data here, for instance:
and in your card component: card.component.html
card.component.ts (Import Input is required)