因此,我有两个arrays,一个用于textLabels数据,另一个用于detailTextLabel。
将有两个“排序按”选项。一个按textLabels数据排序,第二个按detailTextlabels数据排序。因此,当我对第一个array (textLabels array)排序时,第二个array (detailTextLables数组) will also have to get sorted basedon the first数组。我知道如
我希望使用另一个线程下存储在firebase中的值对ngRepeat中的数组中的对象进行排序。见代码和图像。我目前正在使用以下代码,它不会出现错误,但它也不会根据投票的数量对我的对象排序:
ng-repeat="for in For | orderBy: '-dataVotes[for.ref].total'每个ID都是数组中相应对象的元素。我想根据总字段对数组