firebase-util util.scroll命令desc

时间:2016-07-26 18:34:01

标签: angularjs ionic-framework firebase angularfire firebase-util

现在我收到了这段代码,我需要DESC或孩子订购 $key。 示例:7 6 5 4 3 2 1 instead of 1 2 3 4 5 6 7

PD:我正在尝试构建一些像twitter墙但没有登录

// 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');
  };

0 个答案:

没有答案