Currently facing a dilemma where data needs to be saved to the database from Angular UI. The display format of tabular data changes dynamically based on dropdown selections, without having predefined model properties for binding.
The question arises: How can data be saved to the database without a defined model class with properties for binding? Creating over 100+ properties seems excessive, especially when the number of values displayed in the UI is unknown.
For instance, if the dropdown has options A, B, C, D, each resulting in different numbers of rows being returned (15, 30, 50...), how can this data be efficiently saved?
The code snippet below showcases how the data is fetched and displayed in a tabular format:
.ts
// JavaScript code here
.html
<table class="tableInfo">
// HTML table structure here
</table>
Data display is successful, but the challenge remains on how to save the data without a model. With potentially multiple rows that can be edited, the existing dirty property might not suffice. Is there an alternative solution for saving the data or is creating a model class with ngmodel the only way forward?