Guest User

Untitled

a guest
Jan 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. orders:
  2. user001: // this is user 1
  3. 11168128:
  4. name: "order 1"
  5. status: "pending"
  6. 11168129:
  7. name: "order 2"
  8. status: "canceled"
  9. user002: // this is user 2
  10. 11168130:
  11. name: "order 3"
  12. status: "pending"
  13. user003: // this is user 3
  14. 11168131:
  15. name: "order 4"
  16. status: "pending"
  17. 11168132:
  18. name: "order 5"
  19. status: "canceled"
  20.  
  21. this.orders = this.db.list(`orders`)
  22. .snapshotChanges().map(changes => {
  23. return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }));
  24. });
Add Comment
Please, Sign In to add comment