Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POCO2TS.exe to generate typed FormGroup of Angular #123

Closed
zijianhuang opened this issue Jul 20, 2022 · 7 comments
Closed

POCO2TS.exe to generate typed FormGroup of Angular #123

zijianhuang opened this issue Jul 20, 2022 · 7 comments

Comments

@zijianhuang
Copy link
Owner

There might be TS/JS program already doing so upon interfaces?

@zijianhuang
Copy link
Owner Author

@zijianhuang
Copy link
Owner Author

Typed form group declaration.
Helper classes to create form group object.

@zijianhuang
Copy link
Owner Author

properties of array and complex type may be skipped, for the sake of relational db.

@zijianhuang
Copy link
Owner Author

The design of FormGroup depends on many factors:

  1. Whether the backend storage is relational db or structural data.
  2. UX
  3. business workflows.
  4. Predefined values.

@zijianhuang
Copy link
Owner Author

angular/angular#46864

@zijianhuang
Copy link
Owner Author

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 angular/angular#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

@zijianhuang
Copy link
Owner Author

feature done.
new issue if the ng team could improve the supports for automating Reactive Forms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant