You can pass in either a url or a Firebase
ref instance into angularFire()
or angularFireCollection()
. So create a Firebase instance first and set the limit() to what you want, then pass it in instead of the direct url.
The docs state that this version of limit()
returns a Firebase
instance, and a quick test shows it works. You also have to call startAt()
first before calling limit()
.
I got something like this to work:
angular.module('blah', ['firebase']).controller(
'BlahCtrl', function BlahCtrl($scope, angularFire) {
var ref = new Firebase('https://blahblahblah.firebaseio.com/').startAt().limit(200);
angularFire(ref, $scope, 'db', {});
}
)