I have a form in Angular 2 which is bound to a model. Now I want the changes in the model to rollback when the user hits cancel. How do I achieve this?
I'll repeat what was discussed in the comments (because I don't like unanswered questions on SO):
If you make a copy of your model by doing Object.assign({}, yourModel)
you won't mutate the original object, which will allow you to revert to the original object.