Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

retrieve list by id from firebase angular

this.itemsRef = db.list('messages');
// Use snapshotChanges().map() to store the key
this.items = this.itemsRef.snapshotChanges().map(changes => {
  return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }));
});
Source by github.com #
 
PREVIOUS NEXT
Tagged: #retrieve #list #id #firebase #angular
ADD COMMENT
Topic
Name
9+2 =