The autocomplete feature is a suggestion panel that could be added to a regular text input.

Angular Material provides an easy-to-Use auto-complete widget. Here is how it works by example.

You should begin by making the autocomplete panel and the choices it will show. the <mat-option> tags should be used to define each possible choice.

If you want a certain value entered into the text field when a certain option is chosen, you may specify that value by setting the value attribute of the corresponding option.

Here is an example auto-complete

<mat-autocomplete #auto="matAutocomplete">
  <mat-option *ngFor="let option of options" [value]="option">

  </mat-option>
</mat-autocomplete>

  • Date: