I usually build an object with just the changed properties and send that object. I make a copy of the original object before editing it and then use that to compare, but you could easily adapt this to us $dirty. Something along these lines:
function getUpdateObject(orig, current) {
var changes = {};
for (var prop in orig) {
if (prop.indexOf("$") != 0 && orig[prop] !== current[prop]) {
changes[prop] = current[prop];
}
}
return changes ;
};
Then my update code calls this function to get a new object with just my changes, assigns whatever the primary key is from what I'm working with to that object and sends that to the server. I have no idea what your back end is, but you'll most likely need to do an http patch in order for this to work. So something like this:
function save() {
var changes = getUpdateObject(vm.orig, vm.current)
changes.id = vm.orig.id
$http.patch("http:/serviceURI.com (" + changes.id + ")", changes).then(...)
}
I pulled this code out of an app that uses oData and modified it a bit for this answer, but all of this code exists in a service that I use for all of my oData interactions.