In last two posts, we explored about the Filters and saw that how easily we can create custom filter and use as Angular predefined filters. We have used these filters in views for a single as well as an array of items. This is a normal scenario but there could be some cases where you need to use these filters in other components like Controllers, Factory, and Services etc. I have seen many questions around this on different online forums. So I thought to discuss it in detail.
If you are new to Angular Filter or even if you have some idea about, I will highly recommend you to go through my below two earlier Posts then continue. In this post, I will use the same examples that I used in my previous two posts as well.
Exploring Filters in {{AngularJS}} – Part 13
Exploring Filters in {{AngularJS}} Contd. : Custom Filters – Part 14
Note – This post is a part of series of posts on AngularJS and it is fifteenth one. Click here to view all the post. Apart from that you can also use the navigation links for next and previous post in each post at the bottom to check all. Continue reading