I am at first creating an instance of a object
export interface IContent {
type: string;
name: string;
color?: string;
text?: Array<string>;
xStream?: IValueStream;
svgType?: string;
placement?: boolean;
}
export interface ITablist {
id: string;
text: string;
content: Array<IContent>;
}
class something {
tabList: Array<ITablist> = [
{
id: 'large_marker',
text: 'Markers',
content: [
{ type: 'large_marker', name: 'R', text: ['X:', 'Y:'], svgType: 'r' },
{ type: 'large_marker', name: '1', text: ['X:', 'Y:'], svgType: '1' },
{ type: 'large_marker', name: '2', text: ['X:', 'Y:'], svgType: '2' }
]
}
}
Now after some click event I want to add a property xStream
to existing tablist
fillMarkerXData(xData: Array<IValueStream>, xDataDiff: Array<IValueStream>): void {
if (xData) {
this.tabList[0].content[0].xStream = xData[0];
this.tabList[0].content[1].xStream =
this.placement1 ? xDataDiff[1] : xData[1];
this.tabList[0].content[2].xStream =
this.placement2 ? xDataDiff[2] : xData[2];
}
}
but this does not bind it to @input property to child component
.html
<div *ngFor="let length of tabList[0].content; let i = index;">
<marker [valueStream]="tabList[0].content[i].xStream"></marker>
</div>
Here xstream is not upating in child component after the click event. do someone know how I can achieve this Thanx in advance