0

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.

3 Answers 3

3

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 ...

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

I wanted to build it from scratch
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.