I can not find documentation on how to query in this case using ref.where () and orderBy () If the return I do using the where () I have no problem, but when I want to sort the results of form 'desc' does not return anything. I'm using:
Angular: 6.1.6
"angularfire2": "^ 5.0.0-rc.12",
this.figurasCollection = this.afs.collection<any>('figuras', ref => {
const query = ref.where('year_torneo', '==', '2019_apertura')
.where('division', '==', 'a_fds') ;
query.orderBy('goles', 'desc');
return query;
});