I have a details form that should load the details of a record by when selected from the List Form. When the details form loads, it supposed to show the details of the selec
Since you're loading data asynchronously the tax
property is undefined
at first. And when angular performs change detection it is trying to get value from [(ngModel)]="tax.taxTypeId"
binding and therefore you're getting the error.
There are many ways to solve the issue:
1) Safe navigation operator
[ngModel]="tax?.taxTypeId" (ngModelChange)="tax.taxTypeId && tax.taxTypeId = $event"
2) Initialize property with predefined value
tax: TaxDto = new TaxDto();
3) Wrap template in *ngIf="tax"