Retrieving Products from Firebase
Learn to retrieve data from the Firebase Realtime Database.
We'll cover the following...
We'll cover the following...
We need to retrieve products in the admin, admin/edit, category, and category/item routes from our database.
Retrieving data in the admin route
We need to list all the products on the admin route. Let’s open app/routes/admin.js and retrieve all the products:
-
Line 7: We use the Ember Data store to retrieve the products. The
findAll()method first checks the records locally. If they’re not present locally, it makes a network call to the Firebase Realtime Database. It searches for/productsin the ...