Ionic-3 ion-input maxlength attribute not working

前端 未结 3 2008
予麋鹿
予麋鹿 2021-02-19 03:55

I have tried to add ion-input for maxlength , max attribute but it\'s not working as per expectation.



        
3条回答
  •  庸人自扰
    2021-02-19 04:26

    HTML:
        
        
    
    
        TS:
        textareaMaxLengthValidation() {
            if (text.length > 50) {
           text= text.slice(0, 50);
            }
    

提交回复
热议问题