It is very common requirement to pass the data from Parent component to child component. In angular this can be achieved using using the @Input decorator, to define an input for a component, we use the
@Input decorator. This decorator tells Angular to treat passed value as an input binding
Below is the Partner Component which has child component Partner contacts, their HTML looks some thing like this
Inside partner component we have child component partner contact list
Partner Contact List: As u can see for the child component we are setting the partner.contacts array value to the the contacts @Input property on the child component. Child component looks some thing like this
As you can see we have declared an @Input property inside the child component so that we can set the this value from parent component.
HTML : It just a table iterating through contacts array.