<form #contactAutocompleteForm="ngForm"
novalidate>
<mat-form-field class="width100 marginBottom10px"
appearance="outline">
<mat-label>Type to find Contact</mat-label>
<input type="text"
name="contact"
matInput
[matAutocomplete]="autoContact"
[disabled]="disabled"
[(ngModel)]="value"
(ngModelChange)="contactSearchQueryChanged($event)" />
<button mat-button
*ngIf="value"
matSuffix
mat-icon-button
aria-label="Clear"
(click)="clearContactSelection()">
<mat-icon>close</mat-icon>
</button>
<mat-autocomplete #autoContact="matAutocomplete"
[displayWith]="displayContactFullName.bind(this)">
<mat-option *ngFor="let contact of contacts|async"
{{contact.detail.fullName}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>