How to add maxLength on ion-input?

devquora
devquora

Posted On: Feb 22, 2018

 

Use Html5 maxlength property to add maxLength on ion-input.

Example

<ion-content padding>
  <ion-list>
    <ion-item>
      <ion-label color="primary" stacked>Stacked Label</ion-label>
      <ion-input type="text" maxlength="4" placeholder="Password Input"></ion-input>
    </ion-item>
  </ion-list>
</ion-content>

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    IONIC Framework Interview Questions

    What is Ionic Framework?

    IONIC framework is an HTML5 platform that enables web developers to build hybrid mobile apps. Hybrid apps are those app..

    IONIC Framework Interview Questions

    What is the difference between PhoneGap, Cordova, and Ionic?

    Cordova: Cordova is a JavaScript framework that builds apps, which can access the device hardware. Cordova cannot buil..

    IONIC Framework Interview Questions

    Who developed Ionic framework?

    Ionic Framework was created by Drifty Co. in 2013 and developed by Max Lynch, Ben Sperry, and Adam Bradley...