I try to modify the text from the input to clear all letters 'a'. With ngModelChange, the model has been changed, but the value in the input would not until I type another valid letter.
I can use something with view child likes input.value = this.testStr
after update model, but I wonder why the value in the input does not follow the model and if any better ways to deal with that.
Follow the topic at (ngModelChange) does not update the UI for specific input, I can change from using ngModelChange
to (change)
event, but that only work the input blurs. I want to change the input value immediately after typing. I tried with ChangeDetectorRef
after updating this.testStr
but it doesn't work also.