Dynamic forms and strict typing #152
-
The new version of the library introduced strict typing on FormGroups, FormControls, etc. I'm fine with refactoring known form types but how to deal with dynamic forms components, where we don't know the exact structure up until we get some data from backend? For example, in my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The most straightforward option may be to add a type annotation to your |
Beta Was this translation helpful? Give feedback.
The most straightforward option may be to add a type annotation to your
DynamicFormComponent
e.g.DynamicFormComponent<T>
and then declare your form asFormGroup<T>
.