Handling Multiple Addresses
Let’s add more advanced features to the form, such as allowing the user to input an arbitrary number of addresses.
The previous form is all well and good for users who use exactly one credit card and never leave the house. If we want to expand our target market beyond a selected group, the form needs to accommodate multiple inputs.
FormArray
The tool we use for this is FormArray
, which represents a collection of FormGroups
. First, take the extracted address model definition:
Get hands-on with 1400+ tech skills courses.