I\'ve the following component:
@Component({ selector: \'pc-radio-button\', templateUrl: \'./radio-button.component.html\', providers: [ {
Goes from my answer of this stackblitz question
Another solution is add as provider NG_VALIDATORS. So, in our function validate we can store the control in a variable
public validate(c: FormControl) { if (!this.control) this.control=c; return null;
See stackblitz