ionic3 ion-select下拉列表

HTML:


  
    stacked>问题类型
    [(ngModel)]="typeTxt" (ngModelChange)="switchType()"  interface="popover" style="height:45px;" placeholder="请选择">
      value="0">请选择
      
*ngFor="let typeData of typeDataArr"> value="{{typeData?.id}}">{{typeData?.type}}

ts:

public typeTxt:any;
constructor(
    public navCtrl: NavController,
    public navParams: NavParams,
) {}

/*选择selectvalue*/
switchType() {
  console.log(this.typeTxt);
}


你可能感兴趣的:(Ionic)