I have an input field and also i need to stop the user from typing more than the allowed character.
<input type="text" name="callsign" maxlength="7" >
It is working in browser.But not working on android devices?
I have an input field and also i need to stop the user from typing more than the allowed character.
<input type="text" name="callsign" maxlength="7" >
It is working in browser.But not working on android devices?
I noticed that maxlength doesn't work on some version of Android. you can try to handle the maxlength in your controller.
and you can call the function in your template/view
Thanks for all your answers.Your answers didn't me a give a proper solution.Then i have created a directive for that.
directive.js
html
Thanks to @Muhsin. Updated to match with
maxlength
Example
Try This define the variable in the controller $scope object and use it in HTML
Controller
Html
Below is the code snippet for Ionic2 with angular
Reference: http://jagadeeshmanne.blogspot.in/2017/08/ionic-2-angular-maxlength-issue-in.html