I have a unique task in my Angular application where I need to collect an unspecified number of entries, such as names, into a list.
My goal is to convert this list of names into an array. To facilitate this process, I would like to offer users the ability to input their names using an input field.
Each time a user inputs a name, I want it to be validated and added to the names array, while simultaneously displaying a new blank input field for the next entry.
Based on my understanding, I believe I will require an array of FormControl
s within my FormGroup
. How can I correctly reference each element by form control name in my HTML form?