Loading episodes…
0:00 0:00

00:00
BACK TO HOME

10xTeam October 13, 2022 1 min read

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>

Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Audio Interrupted

We lost the audio stream. Retry with shorter sentences?