It's stated everywhere that you can pass data from parent to child either via @input or via a service. We have a policy to always use a service, but in this particular case I only know how to implement it with @Input. This code works perfectly for my intentions:
Parent - component.html
<ul>
<li *ngFor="let item of items">
<app-item [item]="item"></app-item>
</li>
</ul>
Child (app-item) - component.ts
@Input() item: Item = {price: 0; size: 0; color: 'none'};
How can I change the child, so that the data will come from a service instead? I know how to do it 'onClick', but not how to do it when there are no user actions involved on the parent, just bare displays of lists (for other reasons, the parent and child have to be separate components).
The only way I can imagine this would work (but it's a teribble idea), if on each iteration on parent, I'd do something like subject.next(item). Any idea would be very much appriciated, I'm completely lost at what I should do.