Reputation: 107
This is the code I have right now:
var url = 'https://*****.firebaseio.com/photos';
var promise = angularFire(url, $scope, 'photos', {});
promise.then(function() {
//limit here.
});
What code can I insert to limit what is returned from the firebase to only those have a specified priority (let's say the priority is "new)?
Thanks for the help.
Upvotes: 3
Views: 1221
Reputation: 7428
Just pass in an already limited query to angularFire, like so:
var ref = new Firebase("https://*****.firebaseio.com/photos");
var promise = angularFire(ref.startAt("new"), $scope, "photos", {});
Upvotes: 6