It appears that there might be a way to accomplish this task by dynamically constructing a form based on a class definition (Angular) without being dependent on the specific class itself. This approach would allow for scalability, enabling the addition of fields to the class without needing to update the form logic and template.
Is there a method or possibly an NPM package available to achieve this?
I have come across using ClassName.toString()
, but parsing it could prove difficult. If necessary, I may consider developing a module to handle this task.
The idea of creating a dummy instance of the class solely for property enumeration purposes seems like a less efficient route to take.