I plan on getting a list from my database where certain entries contain a property that can be set. I want to query and display elements that do not have this property
{
books: {
book_3: {
title: "Return of The King"
},
book_2: {
title: "The Two Towers"
},
book_1: {
title: "The Fellowship of the Ring"
read: 1256953732
}
}
}
I read the first book, and I want to display the remaining two books. In Firebase, I do:
fbl.child('books').orderByChild('read').equalTo(null).on("value", function(data) {
}
And in AngularFire2, I would do something like:
this.af.database.list('books', { query: {
orderByChild: 'read',
equalTo: null
}});
The first method works, and I get book_2, book_3, but the AngularFire2 method returns the whole list! Is there a value that can be specified as a null value? I tried logical operations, empty lines, etc., but nothing works.
Perhaps this is a mistake.
Spyge source
share