Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save AmirTugi/27cbba3d6f7f3d73a257d91347452f34 to your computer and use it in GitHub Desktop.
Save AmirTugi/27cbba3d6f7f3d73a257d91347452f34 to your computer and use it in GitHub Desktop.
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
<mat-option *ngIf="isLoading" class="is-loading"><mat-spinner diameter="50"></mat-spinner></mat-option>
<ng-container *ngIf="!isLoading">
<mat-option *ngFor="let user of filteredUsers" [value]="user">
<span>{{ user.name }}</span>
<small> | ID: {{user.id}}</small>
</mat-option>
</ng-container>
</mat-autocomplete>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment