I am using ngModel in the template and when the variable length becomes 16 and if continue typing then it should trim last character but it is not doing so. And when I trim 2 characters then it starts working.
My agenda is to limit text input up to 16 characters but if someone presses comma then it is allowed.
I know we can directly limit the max length using "maxlength" directive on input box, but I have some conditions to satisfy so do not want to use that.
https://stackblitz.com/edit/ngmodel-tag-issue?file=src/app/app.component.ts