@ngdoc overview @name Tutorial: 9 - Filters @description
angular.module('phonecatFilters', []).filter('checkmark', function() {
  return function(input) {
    return input ? '\u2713' : '\u2718';
  };
});
The name of our filter is "checkmark". The `input` evaluates to either `true` or `false`, and we
return one of two unicode characters we have chosen to represent true or false (`\u2713` and
`\u2718`).
Now that our filter is ready, we need to register the `phonecatFilters` module as a dependency for
our main `phonecat` module.
__`app/js/app.js`:__
...
angular.module('phonecat', ['phonecatFilters']).
...
## Template
Since the filter code lives in the `app/js/filters.js` file, we need to include this file in our
layout template.
__`app/index.html`:__
... ...The syntax for using filters in angular templates is as follows: {{ expression | filter }} Let's employ the filter in the phone details template: __`app/partials/phone-detail.html`:__
...
    
describe('filter', function() {
  beforeEach(module('phonecatFilters'));
  describe('checkmark', function() {
    it('should convert boolean values to unicode checkmark or cross',
        inject(function(checkmarkFilter) {
      expect(checkmarkFilter(true)).toBe('\u2713');
      expect(checkmarkFilter(false)).toBe('\u2718');
    }));
  });
});
Note that you need to configure our test injector with the `phonecatFilters` module before any of
our filter tests execute.
To run the unit tests, execute the `./scripts/test.sh` script and you should see the following
output.
        Chrome: Runner reset.
        ....
        Total 4 tests (Passed: 4; Fails: 0; Errors: 0) (3.00 ms)
          Chrome 19.0.1084.36 Mac OS: Run 4 tests (Passed: 4; Fails: 0; Errors 0) (3.00 ms)
# Experiments
* Let's experiment with some of the {@link api/ng.$filter built-in angular filters} and add the
following bindings to `index.html`:
  * `{{ "lower cap string" | uppercase }}`
  * `{{ {foo: "bar", baz: 23} | json }}`
  * `{{ 1304375948024 | date }}`
  * `{{ 1304375948024 | date:"MM/dd/yyyy @ h:mma" }}`
*  We can also create a model with an input element, and combine it with a filtered binding. Add
the following to index.html:
         Uppercased: {{ userInput | uppercase }}
# Summary
Now that you have learned how to write and test a custom filter, go to {@link step_10 step 10} to
learn how we can use angular to enhance the phone details page further.