ngx-order-by
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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 reverse
  • changeIndicator - optional parameter (number) to handle pipe update (for e.g. when adding or removing element form items array)

Package Sidebar

Install

npm i ngx-order-by

Weekly Downloads

82

Version

1.0.4

License

ISC

Last publish

Collaborators

  • jar555