this one helps. If you choose to perform a lot of items of work on the client, there is a chance that the work may not all complete if the user kills the app or it loses connectivity or some other interruption. A Cloud Function is highly unlikey to get interrupted during its course of execution, so there is a much better chance of all your transactions completing consistently.
AngularJS AngularFire Firebase Cant iterate over firebase data
I hope this helps . Keep in mind that $firebaseObject() and $firebaseArray() are asynchronous. You have to wait for the data to download over the network. While this usually doesn't take long it still means it won't be available immediately. You see the data appear in your view because of AngularJS's dirty checking system. When the data is available Angular automatically populates the view since it knows about the values on $scope.