Angularjs custom filter not working in ionic framework


The custom filter:searchFilter working fine in normal html here is the demo on the other hand the same function doesn’t working in ionic framework.

<input type="search" placeholder="Search" ng-model="filterName">
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="leaf in leafs | filter:searchFilter" type="item-text-wrap" href="#/tab/leafs/{{}}">


$scope.searchFilter = function(obj) {
    var re = new RegExp($scope.filterName, 'i');
    return !$scope.filterName || re.test(obj.botanical_name) || re.test(obj.en_names) || re.test(obj.ml_names);

ionic demo

Unfortunately the console.log($scope.filterName) seems to me as empty. Is there any solution to fix this bug ?