I've ran in to an issue lately where as I thought it would be fairly easy to fix but ran in to problems.
I am using Knockout and MVC where I have a form where users can enter data and they have an option of either submitting the changes that they have made or cancel.
The problem comes when they want to cancel, the changes still get changed, since it binds automatically to the observable. What i want to do is to revert to the old model, before they changed.
me.contactEditCancel = function() {
me.Contact= oldContact;
}
Where the oldContact is assigned when the edit form is opened.
I cant get it to loose its depedencies tracking... Any idea what to do? To copy the observableArray without the tracking, so I dont have to reload the entire page to get the old model back.
Hopefully my question was clear enough, appreciate any help!