not taking long digits, after 17 or 18 th digit,the entered digits changes to zero so My requirement is to limit the digits to 15, in a reusable way.
<input type="number" class="form-control"(keypress)="omit_special_char($event)"
omit_special_char(event,c?:any) {
const charCode = (event.which) ? event.which : event.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 45) {
return false;
}
return true;
}`