I have set up my autocomplete feature, and there are no error messages. However, when I type something in the input field, nothing happens - it seems like there is no action being triggered, and nothing appears in the console.
Here is the HTML code:
<form>
<mat-form-field>
<input type="text" matInput [formControl]="myControl" [matAutocomplete]="auto">
</mat-form-field>
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let n of testValues" [value]="n">
{{n}}
</mat-option>
</mat-autocomplete>
</form>
In the TypeScript file:
import { MatAutocomplete } from '@angular/material/autocomplete';
import { FormControl } from '@angular/forms';
...
public testValues = ['one', 'two', 'three', 'four'];
public myControl: FormControl;
...
constructor() {
this.myControl = new FormControl();
}
Additionally, I have included the following import statement for MatAutocompleteModule in my app module:
import {MatAutocompleteModule} from '@angular/material/autocomplete';
The version of Angular Material being used is:
"@angular/material": "^5.0.0-rc.2",