Ignore:
Timestamp:
01/28/22 18:45:54 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
6fe77af
Parents:
b738035
Message:

search all locations by city or region

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/explore/explore.component.html

    rb738035 r76712b2  
    1414      <ul class="navbar-nav ml-auto">
    1515        <li class="nav-item">
    16           <p-autoComplete [(ngModel)]="text" [suggestions]="filteredCountries" (completeMethod)="search($event)"
    17             field="name" [minLength]="1">
    18             <mat-option *ngFor="let cityName of cities"
    19             [value]="cityName.name">
    20                 {{cityName.name}}
    21             </mat-option></p-autoComplete>
    22           <p-button label="Search" icon="pi pi-search" [loading]="loading[0]" (click)="load(0)" id="button"></p-button>
    23         </li>
    24         <li class="nav-item">
     16
     17          <form class="example-form">
     18            <mat-form-field class="example-full-width" appearance="fill">
     19              <input type="text" matInput [formControl]="myControl" [matAutocomplete]="auto"
     20                [(ngModel)]="selectedPlace">
     21              <mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
     22                <mat-option *ngFor="let option of filteredOptions | async" [value]="option"
     23                  (click)="onPlaceSelected(selectedPlace)">
     24                  {{option}}
     25                </mat-option>
     26              </mat-autocomplete>
     27            </mat-form-field>
     28            <p-button label="Search" icon="pi pi-search" [loading]="loading[0]" (click)="load(0)" id="button">
     29            </p-button>
     30          </form>
    2531        </li>
    2632      </ul>
    2733    </nav>
    2834  </header>
     35
    2936</body>
    3037
Note: See TracChangeset for help on using the changeset viewer.