如何在离子3中的离子选择框中显示离子搜索条

时间:2017-11-01 11:56:44

标签: ionic3

朋友们尝试了所有可能的方法来获取ionselect中的serach bar无法在选择框中获取离子搜索栏试图从html和tsfile获取让我知道是否有可能获得ionserach in ion选择

 ## another way tried in  ts file code ##
        this.countryAlertOpts= {
           inputs: [
            {
              name: 'title',
              placeholder: 'Title'
            },
          ],
          buttons: [
            {
              text: 'Cancel',
              handler: data => {
                console.log('Cancel clicked');
              }
            },
            {
              text: 'Save',
              handler: data => {
                console.log('Saved clicked');
              }
            }
          ]
        };



 ## htmlcode ##



 <ion-item> <ion-label>Select Country</ion-label>
                    <ion-searchbar name="countrysearch" [ngModel]="countrysearch" (ngModelChange)="searchCountries($event)" placeholder="Serach for Countries"></ion-searchbar>
                    <ion-select [(ngModel)]="country" interface="popover" name="country"  (ngModelChange)="getStates($event)">
                    <ion-option *ngFor="let c of countries" value="{{c.id}}" [selected]= "c.id == this.country">{{c.name}}</ion-option>
                    </ion-select> </ion-item>

0 个答案:

没有答案