Filter in ng-options of ionic 1

I am applying the same code of below to my ionic 1 project :

However, when I selected country, corresponding option of state can’t be showed and have the below error :

ionic.bundle.js:26794 Error: [$injector:undef] Provider 'filterFilter' must return a value from $get factory method.$injector/undef?p0=filterFilter

error reference :$injector/undef?p0=filterFilter

May I know why did it happen ? Do I need to inject any filter or customise a filter if I want to use the basic filter function for ng-option in ionic1 ?

Many thanks.

Solved. I found if i added below module, I must return value for the filter. If I removed it, i can use the filter without inject the filter module.

angular.module(‘App’).filter(‘filter’, function() {
//Define your filter here.