Last active
July 7, 2019 15:49
-
-
Save shilpasyal55/3b6d760588132e8a0b5b20f531539c79 to your computer and use it in GitHub Desktop.
Autocomplete component html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="card container"> | |
<div class="label"> | |
<label for="car">Search Car:</label> | |
</div> | |
<div> | |
<input id="car" #carSearchInput placeholder="Search Car By Name" class="form-control" type="text" autocomplete="off" (click)="showSearches = true"> | |
</div> | |
<!-- DropDown Starts --> | |
<div class="card" [hidden]="!showSearches"> | |
<div class="search"> | |
<div *ngFor="let car of searchedCars; trackBy: trackById" tappable (click)="setCarName(car)" class="search-result"> | |
{{car}} | |
</div> | |
</div> | |
<p class="search" *ngIf="searchedCars && searchedCars.length <= 0 && !isSearching">No Car found</p> | |
<p class="search" [hidden]="!isSearching">Searching cars...</p> | |
</div> | |
<!-- DropDown Ends --> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment