1phoneKeyDown(e){
2
3 const keyCode = e.keyCode;
4 if (( (e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) && e.keyCode !=8) {
5 e.preventDefault();
6 }
7}
8
9// IN HTML
10<ion-input [(ngModel)]="phone" id="phone" formControlName="phone" placeholder="Enter Telephone Number" (keydown)="phoneKeyUp($event)" ></ion-input>