We are exploring the idea of developing an AngularJS application similar to Excel that includes support for undo/redo functionality when editing cells.
Do you have any suggestions on the most effective approach to implement this feature?
I am not only interested in undoing changes made to a single cell, but also being able to undo changes made across multiple cells.
I have tried saving the current model state on a stack before each modification, allowing me to restore the model to a previous state for undo actions. However, I'm unsure how to integrate this with REST CRUD operations.
The typical method for handling CRUD is to make immediate REST calls to the backend (updating the database) after each modification. But if we follow this approach, undo actions will only update the Angular model without affecting the database. Additionally, sending the delta between the two models over REST isn't straightforward.