1// make sure you have a similar structure:
2
3//[File.ts]
4 // FORM
5 selectedModeFormControl: FormControl;
6 form: FormGroup;
7 selectedMode: any;
8
9
10 createForm(): void {
11 this.selectedModeFormControl = new FormControl('');
12
13 this.form = new FormGroup({
14 selectedMode: this.selectedModeFormControl,
15 });
16 }
17
18//[File.html]
19 <form name="filters" [formGroup]="form">
20 <input (...) formControlName="selectedMode"> ...
21 </form>