Model-driven form with Angular FormBuilder
Model-driven form with Angular FormBuilder Few weeks ago I explained how we could build reactive forms with Angular . In the previous post, I emphasized on how the reactiveness was enabling us to susbscribe to the state and “react” to any state changes. Since then I have been playing quite a bit with the reactive form and more precisely with the FormBuilder . I ended up being more impressed by the link between FormGroup and UI rendering rather than about the reactiveness nature of the state held by the form. So today I would like to expand more on the FormBuilder by showing the steps needed to build a more complicated form supporting arrays of arrays and different controls like date picker and color picker. This post will be composed by 3 parts: 1. Building the metadata element form 2. Building the array sections 3. Postback 1. Building the metadata element We start with a model which I just made up this model so there is no particular meaning in it. interface Model { name: st...