I'm wondering how I can apply a partial update to an item in $firebaseArray
, and the documentation is confusing with no mention of this. .$save
seems to clobber the entire item:
var ref = new Firebase("https://xxxx.firebaseio.com/items");
$scope.items = $firebaseArray(ref);
someItem = getItem();
someItem.newField= 'Test';
$scope.items.$save(someItem);
This causes the entire item object to be completely overridden, instead of just updating newField
I've seen other discussions of how to do this using $asObject
but I'm still confused how to handle this with items in a $firebaseArray
getItem()
look like?