How to decide when to use child angular component inside parent?
Should it be one entity, for example lessons list and add lesson.
I try to get when I should use child component, when exist real relation between parent and child?
Lets assume we have product card with buttons inside:
<app-product-card>
<!-- Product information here -->
<app-product-buttons></app-product-buttons>
</app-product-card>
On of button app-product-buttons has clic event, that shows list of users, who bought this product.
Should I insert <app-users-producst-buy></app-users-producst-buy> inside:
<app-product-card>
<!-- Product information here -->
<app-product-buttons [product]="product"></app-product-buttons>
<app-users-producst-buy></app-users-producst-buy>
</app-product-card>
Or inside as child in buttons component:
<app-product-card>
<!-- Product information here -->
<app-product-buttons>
<app-users-producst-buy [product]="product"></app-users-producst-buy>
</app-product-buttons>
</app-product-card>
How to make a right decicion on this cases? Or should I use dynamic components?