I'm having two child components and referring from parent and I'm trying to update @Input object after child component initialized
.html:
<div>
<app-child-one></app-child-one>
<app-child-two [data]="test"></app-child-two>
<button (click)="onClick()">Clicked</button>
</div>
.ts:
test: string;
onClick() {
this.test = 'Hello World !!';
}
By the time I clicked on the button both the child components are initialized, how could I update the data property value to the child component after clicking the button ??
<app-child-two>component ?