In component.ts add this function
_keyUp(event: any) {
const pattern = /[0-9\+\-\ ]/;
let inputChar = String.fromCharCode(event.key);
if (!pattern.test(inputChar)) {
// invalid character, prevent input
event.preventDefault();
}
}
In your template use the following
<input(keyup)="_keyUp($event)">
This will catch the input before angular2 catches the event.