How to set default selected value of ion-option?

前端 未结 9 1224
悲&欢浪女
悲&欢浪女 2020-12-09 03:18

I\'m using Ionic v2 and I can not set the selected value when showing the page.


    

        
9条回答
  •  悲哀的现实
    2020-12-09 03:40

    This is working for me.

    In html :

    
         Form 1 
         Form 2 
    
    

    In ts :

    company = {
       form:null
    }; 
    
    constructor(){
       this.company.form = "frm1";
    }
    

提交回复
热议问题