Refer to FormBuilder Members in a Strongly Type safe way, instead of strings in Angular 8
问题 Is there a way to refer to Formbuilder members names in a strongly type fashion? If form builder names change, then the get functions below will not notice, and not display any compilation error. This can create issues in program functionality. Need to refer to formbuilder control members in a clean way. { this.customerForm = this.formBuilder.group({ 'firstName': [null, [Validators.required,Validators.maxLength(50)]], 'phoneNumber': [null, [Validators.required,Validators.maxLength(50)]],