Answers for "best way to filter table in angular"

0

best way to filter table in angular

@Pipe({
   name: 'tableFilter'
})
export class TableFilterPipe implements PipeTransform {

   transform(list: any[], value: string) {

      // If there's a value passed (male or female) it will filter the list otherwise it will return the original unfiltered list. 
      return value ? list.filter(item => item.gender === value) : list;

   }
}
Posted by: Guest on April-23-2020

Code answers related to "best way to filter table in angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language