ngx-order-by
v1.0.4
Published
Order by multpile fields and directions pipe for Angular >= 2
Downloads
79
Maintainers
Readme
NgxOrderBy
Order by multpile fields and directions pipe for Angular >= 2
How to install
Install package with npm
npm install ngx-order-by
Import in your module file
import {NgxOrderBy} from 'ngx-order-by';
And then include this module in import section in @NgModule
imports: [
NgxOrderBy
...
]
How to use
<li *ngFor="let item of items | ngxOrderBy:orderFields:orderReverse:changeIndicator;">
...
</li>
orderFields
- array of fields to order by (Array)orderReverse
- boolean value defines order direction. If true then reversechangeIndicator
- optional parameter (number) to handle pipe update (for e.g. when adding or removing element form items array)