Questions tagged pipes-filters

Explore the latest questions and answers asked by our top developers.

SortPipe passing parameter

import { Pipe, PipeTransform } from ‘@angular/core’; import { courses } from ‘../interface/courses’; @Pipe({ name: ‘sort’ }) export class SortPipe implements PipeTransform { transform(value: Array<courses>, args: any[]): Array<courses> { const sortField = args[0]; const sortDirection = args[1]; let multiplier = 1; if (sortDirection === ‘desc’) { multiplier = -1; } value.sort((a: any, b: any) => […]

custom Pipe for implementing the list filter

I have a pipe to filter the list But I used to specify it in the component selector, but how do I specify pipe in the html code @Pipe({ name: ‘filter’ }) export class FilterPipe implements PipeTransform { transform(todo: Todo[], search = ”): Todo[] { if (search.length === 0) { return todo; } if (!search.trim()) […]

By Delion
Published
Categorized as angular, angular-pipe, css, html, pipes-filters Tagged , , , ,

Filtering an Array of Nested Objects Using Angular Pipes

I am trying to filter nested array values along with object name is getting filter when I search number values like age, weight, height and mobile not getting anything. If match with the searchText it must return a specific value along with the object if not then return full array instead of not found message. […]

By Abdul Razzak
Published
Categorized as angular, arrays, javascript, pipes-filters Tagged , , ,

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq