problem
How to assign ng model input type text on header to ngfor element ?
I work on application work on angular 7 with asp.net core 2.1
on html component i have input type text and i need to assign it to ngfor element ?
but cannot do that
actually i need when user write or input type textbox branchcode as 2 then 2
will come to propery inside ngfor ?
What I have tried:
suppose i write on sales header input type text as 2
on salesorder.component.html
<div class="form-group">
<label>BranchCode</label>
<div class="input-group">
<input name="branchCode" #branchCode="ngModel" [(ngModel)]="api.SHeader.branchCode" class="form-control">
</div>
</div>
Here on view i need to get 2 inside ngfor to element branchcode
<tr *ngFor="let item of api.Sfooter;let i = index;">
<td [(ngModel)]="api.SHeader.branchCode">{{item.branchCode}}</td>