A orderby object filter for a pure Firebase JavaScript API

后端 未结 2 1827
遇见更好的自我
遇见更好的自我 2021-01-12 14:12

I found angularFire is always confusing me when used in conjunction with the pure Firebase JavaScript API.

Let\'s say I have no idea how to call the Fir

2条回答
  •  既然无缘
    2021-01-12 14:57

    Take a look at the orderByPriority filter source code - which converts an object into an array ordered by the Firebase priority: https://github.com/firebase/angularFire/blob/master/angularfire.js#L37

    You can include the key of the object directly in each item in the array by setting a special $key property.

提交回复
热议问题