What are FormArray and dynamic forms?
Model answer
A FormArray holds a list of controls or groups that can grow or shrink, such as several phone numbers or order lines. You add and remove items with push() and removeAt(), and loop over controls in the template with @for.
For forms built from configuration, you can create controls in code from a JSON-like definition. Keep keys stable and use track so Angular does not recreate every row when one changes.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.
More questions
- What is the difference between template-driven and reactive forms?
- How do you add validation to a reactive form?
- How do you write a custom validator?
- What are async validators and when do you need one?
- What is the difference between valueChanges and statusChanges, and how do you use them safely?
- What do touched, dirty and pristine mean?