I need to modify an input based on a value from a TypeScript variable in the oninput
attribute. This modification should only apply to English characters.
In my HTML file:
<input class="form-control"
oninput="value=value.replace(regex, '');"
[(ngModel)]="value"/>
In my TypeScript file:
public regex = '/[^0-9]/g'
Error: regex is not defined