I am just starting to use Angular2 and engaged the following problem. Template (Main Component):
<span *ngFor="#data of dataset" >
<data-widget [data]="data"></data-widget>
</span>
Template (Widget Component):
<div>{{someCompValue}}</div>
The value of someCompValue is need to be created from set of properties inside the data member variable.
Where should I inject the code to compute the someCompValue? I tried to do it inside constructor() but that moment the data is not yet assigned (=null).