这是我的代码
<input class="form-control" placeholder="Pickup Location" places-auto-complete
(place_changed)="pickupChanged($event)" formControlName="pickup_location"
[types]="['geocode']" />
如何设置输入类型的选项以将值限制为特定国家(例如uae)
答案 0 :(得分:0)
我添加了componentRestrictions
和[types]="['(cities)']"
效果很好。
<input class="search-set form-control" [(ngModel)]="placeFilter" places-auto-complete (place_changed)="placeChanged($event)" [types]="['(cities)']" [componentRestrictions]="{country: 'ae'}" [ngModelOptions]="{standalone: true}" />