▼ Angular 5+ orderBy pipe
Now the value passed to pipe is not directly modified
Import OrderPipe
to your component:
import { OrderPipe } from 'ngx-order-pipe';
Add OrderPipe
to the constructor of your component and you're ready to use it:
constructor(private orderPipe: OrderPipe) {
console.log(this.orderPipe.transform(this.collection, this.order));
}