现在我收到了这段代码,我需要DESC
或孩子订购 $key
。
示例:7 6 5 4 3 2 1 instead of 1 2 3 4 5 6 7
// create a connection to Firebase
var baseRef = new Firebase('https://<3.firebaseio.com/');
// create a scrollable referencex
var scrollRef = new Firebase.util.Scroll(baseRef, '$key');
// create a synchronized array on scope
$scope.items = $firebaseArray(scrollRef);
// load the first three contacts
scrollRef.scroll.next(3);
// This function is called whenever the user reaches the bottom
$scope.loadMore = function() {
// load the next contact
scrollRef.scroll.next(1);
$scope.$broadcast('scroll.infiniteScrollComplete');
};