Do have to implement various data filters in Angular Application which has Data displayed using Table and ngFor.Have gone through various ways like various ways using Pipe in Type Script,but have found in angular docs that it is discouraged using pipes.If so then which is the best option to implement Multiple Filters in Angular?.Curious to know the Solutions..
yes, it is very discouraged and performance killing using pipe in ngFor,
only for filtering or sorting lists as there are no inbuild pipes in angular for this. this is because they perform poorly and prevent aggressive minification that means it removes all unnecessary characters from source code without changing its functionality. Filtering and especially sorting are expensive operations.
The Angular team and many experienced Angular developers strongly recommend moving filtering and sorting logic into the component itself.
it's always better to create your own such pipes
there are many such examples for this online on the internet as well as the angular team also explained this very well here
I hope you understand and this performance issue is only for sorting and filtering pipe and not on inbuild pipes like date etc.