I have a piece of code.
If you are using lodash your pipe can be like this:
import { Pipe, PipeTransform } from '@angular/core';
import { orderBy } from 'lodash';
@Pipe({
name: 'orderBy'
})
export class OrderByPipe implements PipeTransform {
transform = orderBy;
}
And then you can use all the power of the method:
-
{{product.name}}