Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Oriented Development with Angularjs

You're reading from  Data Oriented Development with Angularjs

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781784398057
Pages 156 pages
Edition 1st Edition
Languages

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/) libraries from the CDNs. In a real-life scenario, we...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}