0

I have this method that works well:

  getOrders(params): Observable<any> 
  {
    return Observable.fromPromise(this.WebDBService.tbOrder.orderBy('[username+annord+tipord+numord]').reverse().toArray());
  }

it returns all the table data properly sorted.

Now I want to filter the tbOrder by username property but I don't know how to combine query filters with orderBy method...

Can you help me?

Thanks

DarioN1
  • 2,460
  • 7
  • 32
  • 67

1 Answers1

2

To apply sorting above a query, use sortBy(). It works like toArray() but sorts the resulting array using the given property.

David Fahlander
  • 5,058
  • 1
  • 20
  • 19