
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>
- Author: Ahmed Bouchefra Follow @ahmedbouchefra
-
Date:
Related posts
Seeding test data in TypeORM Setup TypeORM TypeORM Entity & Column decorators Setup TypeORM Create PostgreSQL database & user Angular 14 Apollo Client Setup Angular 14 Apollo Client Setup Debugging Angular applications Configuring CORS with Express.js Mocking GraphQL with Apollo Server GraphQL APIs with Apollo Server & Apollo Studio [Part 2] GraphQL APIs with Apollo Server & Apollo Studio Watch and compile TypeScript code to JavaScript Setup TypeScript with Node.js & Express.js Setup the server with Node.js/Express.js/Apollo Storing data with PostgreSQL and TypeORM Using GraphQL and Apollo for front- and back-end integration Using NVM on Windows How to Use Node.js to Run JavaScript on Servers Modern full-stack single-page apps' architecture 99+ Web Development Projects Challenges