When dynamically generating a form, I bind the calculateBCT function to a textbox like this:
<input matInput type="text" (keyup)="calculateBCT($event)" formControlName="avgBCT">
, and display the result in another textbox using ngModel below.
<input matInput type="text" [(ngModel)]="calculatedResult" formControlName="avgCapacity">.
The expected output: When a value is entered in Textbox0, the calculateBCT function should be called and the result should reflect in Result0 textbox only. The same goes for Textbox1 calling calculateBCT and Result1 being updated accordingly, and so on.
If anyone can help me achieve this expected output, it would be greatly appreciated.