Ngx Order Pipe Versions Save

▼ Angular 5+ orderBy pipe

2.2.0

2 years ago

Changed

  • [#106] - Update underlying project dependencies to Angular 10
  • Minor types and naming changes

2.1.2

2 years ago

Improvements

  • [#131] - Fix expression array being reversed

2.1.1

3 years ago

Improvements

  • [#107] - Error ordering by null date property
  • [#108] - Fix error ordering by null date property

2.1.0

3 years ago

Improvements

  • [#91] - Multiple orders with date, second item is reversed
  • [#103 - Fixed date comparison in default comparator

2.0.4

4 years ago

Improvements

  • [#87] - fix error when expression point on sub-property of an undefined object

2.0.3

4 years ago

Improvements

  • [#82] - Upgrade to Angular 8

2.0.2

5 years ago

Improvements

  • [#79] - feature: support for callable function attribute on data source
  • [#74] - Allow to sort also by function return value?

2.0.1

6 years ago

Features

  • [#54] - multiple fields sorting
  • [#14] - Multi Ordering

Feature

The expression now accepts string as well as array of strings to perform multi order.

Example, order by name and age:

<div *ngFor="let item of items | orderBy: ['name', 'age']">
  {{ item | json }}
</div>

2.0.0

6 years ago

Breaking changes

  • [#52] - Value passed to transform() should not be modified.

Now the value passed to pipe is not directly modified

1.2.1

6 years ago

Features

  • [#48] - Add OrderPipe as provider in the OrderModule

Use OrderPipe in the component

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));
}