In a unique scenario, I wrote code that fetches information from an API server without knowing the structure of the response fields. Once I receive the response, I need to create a form for updating the data and sending it back. To handle unknown ngModel properties, I dynamically generate fields after receiving the response and assign them to ngModel in a loop within my template.
However, after stopping and restarting my Angular 5 app using 'ng serve -o', I encounter a compile error on the first startup. Interestingly, if I comment out the problematic code, compile successfully, and then uncomment it, everything works as intended.
order.component.ts
// Code snippet not provided
order.component.html
// Code snippet not provided
order.service.ts
// Code snippet not provided
order.model.ts
// Code snippet not provided
My issue arises when creating new fields dynamically after receiving API response. The errors TS2339 indicate missing properties like 'className', 'label', and 'value'. How do I resolve this? Should I disable the compiler checking or refactor my code?