I want when user typing in input execute a function,like this :
<input
id="cell"
type="text"
name="cell"
ngControl="cell"
(change)="topersian($event)"
>
topersian($event){
$event.currentTarget.value = $event.currentTarget.value.toPersianNumber();
}
I don't want to use (keypress)
or (keyup)
because user can see the English number.
I use [(ngModelChange)]
but can't access to $event
, just get value!
how to fix this problem ? or anybody have A better solution?
(keypress)
and(keyup)
is?(keydown)
then?change
event seems to be stackoverflow.com/a/21042928/217408 The chrome bug still doesn't seem to be fixed.keydown
have problem like this...aaah shit