npm.io
1.0.2 • Published 5 years ago

angular-pipes-module

Licence
—
Version
1.0.2
Deps
1
Size
29 kB
Vulns
0
Weekly
0

angular-pipes-module

This library contains reusable Angular pipes for sorting and filtering.

Pipes

  • filterObjects - Filters out any object where none of its properties contain the passed in search string filterObjects(input: object[], query: string)
  • sortObjects - Sort objects either accending or decending by comparing one of the object's properites sortObjects(input: object[], field: string, desc = false)

Usage Example

<tr *ngFor="let user of users | filterObjects:searchString | sortObjects:sortType:sortReverse">