I'm using the template-driven forms and while changing the ngModel value the phone number doesn't get empty if the new value is empty. In my scenario, I'm maintaining employee data as drafted data.
The toggle is used to switch between drafted and non-drafted data. If the non-drafted employee has a phone number while in drafted data we removed that phone number the form is not changing the field value
The image below shows the drafted data and both phone numbers should be empty but they're not.
I'm using the template-driven forms and while changing the ngModel value the phone number doesn't get empty if the new value is empty. In my scenario, I'm maintaining employee data as drafted data. The toggle is used to switch between drafted and non-drafted data. If the non-drafted employee has a phone number while in drafted data we removed that phone number the form is not changing the field value The image below shows the drafted data and both phone numbers should be empty but they're not.
Code:
Tried these solutions but nothing helped.