Reputation: 1245
I am working on a project where I have to implement dynamic forms in Angular 6 based on a JSON Schema, So, wanted some suggestions on how to go forward with it.
Upvotes: 0
Views: 2707
Reputation: 895
You can use dynamic-form-schema. dynamic-form-schema provides a base class and a service. Base class can be derived/extend by your Component and you are free to provide your own View (template).
No dependency on an already created dynamic form component - That is an implementation of Formly or ng-dynamic-form library
Check answer for more details: https://stackoverflow.com/a/68513528/4424365
Upvotes: 0
Reputation: 1020
We use the ngx-formly module for rendering forms using json schema. It is a very vast library with awesome community support and a whole lot of features. You just need to pass your json schema in a specific format and the form will be rendered with all validations.
https://github.com/ngx-formly/ngx-formly GitHub - ngx-formly/ngx-formly: JSON powered / Dynamic forms in ...
Upvotes: 3
Reputation: 222582
If you want to use some library and build your application you could use ng-dynamic-form library.
If you want to build on your own use reactive forms
with dynamic component loader
Upvotes: 1