Get access to FormControl from the custom form component in Angular
Get access to FormControl from the custom form component in Angular I have a custom form control component in my Angular application, which implements ControlValueAccessor interface. ControlValueAccessor However, I want to access the FormControl instance, associated with my component. I'm using reactive forms with FormBuilder and providing form control using formControlName attribute. FormControl FormBuilder formControlName SO, how do I access FormControl instance from inside of my custom form component? FormControl 3 Answers 3 This solution was born from the discussion in the Angular repository. Please, make sure to read it or even better to participate if you are interested in this problem. I've studied the code of FormControlName directive and it's inspired me to write the following solution: FormControlName @Component({ selector: 'my-custom-form-component', template...