Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. .factory("Products", ["$firebaseObject", "$rootScope",
  2. function($firebaseObject, $rootScope) {
  3. return function() {
  4.  
  5. // create a reference to the database where our Products is.
  6. var ref = ($rootScope.ref.child("Products"))
  7.  
  8. return $firebaseObject(reg);
  9. }
  10. }
  11. ])
  12.  
  13. Products().$bindTo($scope, "products");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement