I have an input text like below:
<input type="text" style="width: 80%" data-bind="value: Note, event: { blur: $root.UpdateNote}" />
It contains the value of observable variable Note. And on blur it updating note. My problem is to check the previous value of note with current value of note before updating.
Here is my constructor containing all variables
function Goal(data) {
var self = this;
self.GoalID = data.GoalID;
self.Note = ko.observable(data.Note);
}
In my viewmodel i have declared note as observable variable like below:
self.Note = ko.observable();
In knockoutjs, how to get previous value of an observable variable??