Creating a custom filter
Filters are a feature of AngularJS and not specific to Ionic. The main reason you might want to use a filter is when you just need the data to be displayed in a different format in the view. You don't want to change the actual value in the controller or factory. This makes things very convenient because you don't have to decide upon a specific format within the controller code while leaving the flexibility in the view component.
Here is the list of some out-of-the-box filters (from https://docs.angularjs.org/api/ng/filter):
currency
number
date
json
lowercase
uppercase
limitTo
orderBy
In this recipe, you will learn how to add more filters using the angular-filter
module as well as create a custom filter. The following is the screenshot of the app:
Getting ready
There is no need to test in a physical device because the AngularJS filter will work just fine in a web browser.
How to do it...
Here are the instructions to create a custom filter:
Create a new app using...