1@Pipe({
2 name: 'tableFilter'
3})
4export class TableFilterPipe implements PipeTransform {
5
6 transform(list: any[], value: string) {
7
8 // If there's a value passed (male or female) it will filter the list otherwise it will return the original unfiltered list.
9 return value ? list.filter(item => item.gender === value) : list;
10
11 }
12}
13