2017-12-27 250 views

回答

0

試試這個:

<mat-autocomplete *ngIf="selectedClientForSearch?.length >= 1" #auto="matAutocomplete" [displayWith]="displayFn"> 

或者:

<input type="text" placeholder="{{ 'client' | translate }}" matInput [formControl]="entitySearchCtrl" [(ngModel)]="selectedClientForSearch" [matAutocomplete]="selectedClientForSearch?.length >= 1 ? auto : null"> 
相關問題