AngularFire
When we talk of building any system, we either have to deal with objects, or with collections. Those objects often contain collections, for example, in a one-to-many relationship. So, AngularFire gives us two different services—$firebaseObject and $firebaseArray—to synchronize objects and arrays with the backend. Let's see how to use each of these services in the following examples.
Synchronized arrays with $firebaseArray()
So, here's our index.html file (just the relevant part of the code is shown):
<script src="https://cdn.firebase.com/js/client/2.2.3/firebase.js"> </script> <script src="https://cdn.firebase.com/libs/angularfire/1.0.0/angularfire.min.js"> </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"> </script>
(Chapter5\sync-objs-arrays\index.html)
We are referring to firebase, angularfire, and the Underscore (http://underscorejs.org...