Thanks to Avetik and Imo for most of the info I am listing. The following steps work in Angular 13+:
Create a file form-control.pipe.ts in your base project folder:
import {Pipe, PipeTransform} from '@angular/core';
import {AbstractControl, FormControl} from '@angular/forms';
@Pipe({
name: 'formControl',
})
export class FormControlPipe implements PipeTransform {
transform(value: AbstractControl): FormControl {
return value as FormControl;
}
}
In the declarations section of @NgModule for your project, add FormControlPipe to the list and import it.
Anywhere you are getting this lint warning, add | FormControl (include the pipe symbol)
[formControl]="form.get('wordRuleForm').get('sound') | formControl"
Problem solved!
I had a similar control with formGroup, so I created a similar filter based on formGroup, and it is used like this:
[commonForm]="form.get('commonForm') | formGroup"