Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

search box in material angular

<div class="search-bar">
    <mat-icon>search</mat-icon>
    <form class="example-form">
        <mat-form-field class="example-full-width" appearance="fill">
          <input type="text"
                placeholder="Search for a food item ..."
                matInput
                [formControl]="myControl"
                [matAutocomplete]="auto">
          <mat-autocomplete #auto="matAutocomplete">
            <mat-option *ngFor="let option of options" [value]="option">
              {{option}}
            </mat-option>
          </mat-autocomplete>
        </mat-form-field>
      </form>
</div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #search #box #material #angular
ADD COMMENT
Topic
Name
5+6 =