dschnelldavis / angular2-json-schema-form

Angular 2 JSON Schema Form builder
MIT License
285 stars 177 forks source link

Support for ngFormOptions and ngModelOptions #293

Open hk-skit opened 6 years ago

hk-skit commented 6 years ago

Currently we don't have any provision to add ngFormOptions and ngModelOptions to controls which got introduced with Angular 5 (form updates). It would be really nice if we provide support for these options which will help us to enrich user experience especially in terms of validation.

Proposed solution: For model options, we can introduce a new field ngModelOptions in widgetOptions aka layout node options which will be supplied to FormGroup, FromArray and FromControl constructor in buildFromGroup function via template argument.

For ngFormOptions, we can introduce new field in formOptions but how it's gonna be used internally that we might need to ponder upon.