Please refer to my snippet below. How can I get the old value of the changed model, in this case is the age in vuejs?
It may be too late. This worked for me as long as the function name inside the watch object is named as the variable which is watched. It only watches the specific variable.
watch:{
items: function(newVal, oldVal){
console.log("New value: "+ newVal + ", Old value: " + oldVal);
},
other_variable: function(newVal, oldVal){
console.log("New value: "+ newVal + ", Old value: " + oldVal);
}
}