AngularFire used to have a orderByPriority filter

后端 未结 1 325
逝去的感伤
逝去的感伤 2021-01-24 21:59

From Google result it looks like AngularFire used to have a orderByPriority filter. But I cannot find this in the current AngularFire api docs: https://www.firebase.com/docs/web

1条回答
  •  隐瞒了意图╮
    2021-01-24 22:48

    There is no longer a need for orderByPriority since you can utilize a synchronized array, which is already implicitly ordered.

    So in ancient days, you would do something like:

    $scope.data = $firebase(ref);
    
    

    In not so ancient times (i.e. 0.8.x or greater) you would simply choose an array format:

    $scope.data = $firebase(ref).$asArray();
    
    

    0 讨论(0)
提交回复
热议问题