Is there a way to detect changes in an object connected to a large form? My goal is to display save/cancel buttons at the bottom of the page whenever a user makes changes to the input.
One approach I considered was creating a copy of the object and using *ngIf="object !== object_copy"
. If the user hits cancel, I would simply revert back to the copied object. However, I'm not sure if this method is efficient since it involves doubling the variables for a simple task. I'm relatively new to Angular and struggling to implement this method as making a copy seems to cause the object to lose its type.
I'm seeking guidance or suggestions on alternative methods to achieve this. Can anyone assist me with this issue?