This current function prevents the user from typing any character but numbers. I would like to adjust it to allow commas and the spacebar as well. How would I adjust it.
numbersFunction(event: any): boolean {
const charCode = (event.which) ? event.which : event.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}