Question

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.

Was it helpful?

Solution

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", {});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top