Edit: I have solved my own question with ngModelChange.emit($event.target.value) on blur.
I have a requirement to show a date mask in an input field like
__/__/____
and as the user types it replaces the under scores with the numbers they type. I have created a directive that works quite well but calling preventDefault on the keydown event kills ngModel. If I don't prevent default the text replacement is not as smooth as they keypressed character appears in the text and then my replaced text appears. It is not a nice smooth result.
I have a StackBlitz here.
https://stackblitz.com/edit/angular-iucv4f
Does anyone have any ideas on a different way to mask the input or to get ngModel working with the way I am doing it?