I am using AngularJS and FireBase in my app. I like binding FireBase object references to the Angular scope with angularFire, but if I want to perform an update of the bound scope object in transaction - I have to create a new FireBase reference which kills all the beauty of using angularFire and increases a chance for potential issues since there are two references pointing to the same FireBase object:
angularFire(travelBidsFirebaseRef + "/auction/" + $scope.auctionId, $scope, 'auction', {})
.then(function(disassociate) {
$scope.auctionRef = travelBidsFirebaseRef.child('auction/' + $scope.auction.id);
...
$scope.auctionRef.transaction(function(auction) {
auction.price = Math.round((auction.price + 0.01) * 100)/100;
});
...
}
Is there a way to use angularFire bound scope object to perform the transaction?