Open Source Angular Libraries contributed by @myndpm
There was no backward compatible way to support the old provisioning of Controls, and a simpler+easier one was inevitable.
Now we can provide our array of custom components directly to DynFormsModule.forFeature({ controls })
and the library will extract the static Ids from the components, no need to bother with a provider object anymore :tada:
A schematic will be released soon to convert all the code with ng update @myndpm/dyn-forms@latest
.
DynControlType
to DynControlId
node.query
to node.searchUp
node.select
to node.searchDown
node.search
to search up and down recursivelySync controls not synced with KeyValue options, and fixed a syntax error in the DynModule schematic.
BREAKING CHANGE:
DynOption
is now KeyValuePipe
compliant,
please update your control options configs from { value: T, text: string }
to { key: T, value: string }
This will be useful to have Map<T, string>
passed as options
and looped inside the controls with options | keyValue:sortFn
.
Added support for error messages per control (config.errorMsg) and at form level (config.errorMsgs).
Check this source config to see how the serial
field error-messages were configured.
Validators, AsyncValidators, Matchers, Conditions and Control Functions
can be provided with inline functions
inside the configuration, not just by id
.
ng generate @myndpm/dyn-forms:control --id=SLIDER --name=slider --prefix=dyn-mat
--project=forms --path=libs/forms/ui-material/src/components
ng generate @myndpm/dyn-forms:module --name=DynFormsTaiga --prefix=dyn-tui
--project=forms --path=libs/forms
--controlName=input --id=INPUT