I have a reactive form that has some default values and want to disable the save button until the user has changed something and if the user has changed it back to the initial state.
I can subscribe to valuechanges
, but I want to know if the form is back to initial state after some changes (the user reverted the changes) and disable the save button.
I can't use Form.dirty
as it becomes dirty once the user has changed something and not pristine
again if the user has reverted his changes.
Any other way than JSON.stringify
compare?