Using ionic 2, How can we set a limit on the number of numbers in an input field? The hint I got is to use ngModelChange as keypress events do not work in android. I am still stuck on how to stop numbers from entering after the limit has exceeded.
<ion-item> <ion-input type="password" placeholder="Password (required)" [ngModel]="test" (ngModelChange)="get($event);test=$event;"></ion-input> </ion-item>
The test variable will contain the old value. But how to stop numbers from entering after the length has exceeded a number?