馃殌 feature request
Relevant Package
@angular/forms
Description
Currently get on AbstractControl returns an AbstractControl. This works as intended but dosen't play well with strictTemplates and deeply nested forms.
Describe the solution you'd like
add the methosd getGroup getControl getArray which will run the get function but then cast the type and do a runtime check to ensure it's the correct runtime type also.
Describe alternatives you've considered
Put a method in your component class, but this isn't ergonomic
asControl(c: AbstractControl): FormControl { return c as FormControl }
Happy to submit a patch
馃殌 feature request
Relevant Package
@angular/formsDescription
Currently
geton AbstractControl returns anAbstractControl. This works as intended but dosen't play well withstrictTemplatesand deeply nested forms.Describe the solution you'd like
add the methosd
getGroupgetControlgetArraywhich will run thegetfunction but then cast the type and do a runtime check to ensure it's the correct runtime type also.Describe alternatives you've considered
Put a method in your component class, but this isn't ergonomic
Happy to submit a patch