In my AngularFire2 database, for one of JSON entry want to know the length or size - how many parent nodes are available?
How to get the size of items? If it is zero (the items entry is not there), I will push a item:
items: FirebaseListObservable<any>;
this.items.push(item);
this.items = af.database.list('/items', { preserveSnapshot: true });
this.items
.subscribe(snapshots => {
snapshots.forEach(snapshot => {
console.log(snapshot.key)
console.log(snapshot.val())
});
})