/** * Created by HARSHA on 31-05-2017. */ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'filterOrderBy' }) export class FilterOrderByPipe implements PipeTransform { transform(value: any, args?: any): any { value.sort((a: any, b: any) => { if (a.priority < b.priority) { return -1; } else if (a.priority > b.priority) { return 1; } else { return 0; } }); return value; } }