Closed zijianhuang closed 6 months ago
Typed form group declaration. Helper classes to create form group object.
properties of array and complex type may be skipped, for the sake of relational db.
The design of FormGroup depends on many factors:
If you are using Reactive Forms, you may have been dreaming of generating a FormGroup from an interface/model rather than hand-crafting. I have created an proposal to the Angular team through https://github.com/angular/angular/issues/52559
If you like this, please upvote to make it happen sooner. And I have created a code generator that can read .NET data models and generate interfaces along with functions of creating typed FormGroup which can be used in your Angular app with Reactive Forms: https://www.nuget.org/packages/Fonlow.WebApiClientGenCore.NG2FormGroup
And the generated codes of a real world project is here: https://github.com/zijianhuang/DemoCoreWeb/blob/master/RealWorldExamples/PoetryManagementAndPublishing/WebApiNG2ClientAuto.ts
feature done. new issue if the ng team could improve the supports for automating Reactive Forms.
There might be TS/JS program already doing so upon interfaces?