I have an issue where I need to update my chart component after inputting values into a form field. However, I am unsure of how to accomplish this task.
This is the code in my start.component.html file:
<input [(ngModel)]="inputValue"/>
<select (change)="selectedItem($event)">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
The data received through ngModel directive is then passed to the chart component as follows:
<app-chart [optionsIncome]="options" [inputValue]="inputValue"></app-chart>
My issue lies in needing to refresh the chart component template after inputting values into the form field. While it works with the dropdown field, I am uncertain how to achieve the same result with the ngModel directive that is passed to another component and subscribed via BehaviorSubject.
Here is an example: Example