Hi,
I am having a parent that needs to “trigger” or pass a data that will trigger a function. Let’s say “reddish()”.
I “ngfor” the child.
<parent>
<div *ngFor="let item of object">
<child [item]="item"> </child>
</div>
</parent>
I need on certain event coming from Parent, that all child with a certain condition (if they were touched) get reddish. Reddish is for the example.
in a nutshell: if parent say get reddish and they are touched => they get reddish.
I checked angular2 doc, and the only solution I am finding is with “input” and add another attribute
<child [item]="item.item" [reddish]="item.bool"> </child>
And then a ngonchange? Doing that way it is like my child-component’s method is useless, isn’t it?
A bit lost in Angular
Thanks for your help,
Stéphane.