Currently, I am dealing with a reactive form that consists of 20 different inputs. An example of one input is shown below:
<input formControlName="name" matInput>
For each input, I find myself needing to write an accessor function like the one below:
get nameControl(): AbstractControl {
return this.form.get('name');
}
Having to create 20 separate functions for each input seems inefficient. Is there a more efficient way to handle this task since accessors do not accept any arguments?