Issue
I am new in Firebase. I have problem while executing query:
new Firebase("https://blazing-fire-2739.firebaseio.com/users")
.startAt($scope.user.email) //karank@ocodewire.com
.endAt($scope.user.email)
.once('value', function(snap) {
console.log('accounts matching email address', snap.val())
});
This shows me null.
In Firebase:
users
-JxFNEu31LJ0Efy8PnX5
email: karank@ocodewire.com
firstname:karan
lastname: sofat
Please Help
Solution
.startAt
and endAt
doesn't accept a string, it accept a number where to start/end at. So you would have to change to
new Firebase("https://blazing-fire-2739.firebaseio.com/users")
.startAt(1)
.endAt(50)
.once('value', function(snap) {
console.log('accounts matching email address', snap.val());
});
Or just leave out the endAt()
altogether.
Answered By - Chrillewoodz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.