How to filter and show data with event ng-keypress?

Hi guys, I want to filter and show data with event ng-keypress . I try so much but seem it’s not work.

<ion-content>
<div>
<input type="text" placeholder="Search"  ng-keypress="GetCatByName(c.Name)" >
</div>
<div class="list"> 
<div ng-repeat="c in Categories" >
{{c.Name}}
</div>
</div>
</ion-content>

And in controller.js as

$scope.Categories = [];
$scope.GetCatByName = function (u) {
ToList.select("SELECT * FROM Category WHERE Name LIKE '%" + "?" + "%'", [u.Name]).then(function (res) {
$scope.Categories = res;
});
};

so , when i tested it in browser Chrome . get error

code: 5
message: "number of '?'s in statement string does not match argument count"
__proto__: SQLError

Can you tell me , what’s the mistake or wrong in here ?
Thank guys.

could you be more specific
what is c in input -type. In input type define ng-model =“name” to get text in in ng-keypress event .

Dear @nitishrajput01 , as you say

<ion-content>
<div>
<input type="text" placeholder="Search" ng-model ="name"  ng-keypress="GetCatByName(name)" >
</div>
<div class="list"> 
<div ng-repeat="c in Categories" >
{{c.Name}}
</div>
</div>
</ion-content>

In services.js , i have

.factory('ToList', function ($rootScope) {
return {
select: select,
}
function select(query, parameter) {
var result = [];
var db = $rootScope.db;
return $q.when($cordovaSQLite.execute(db, query, parameter).then(function (res) {
for (var i = 0; i < res.rows.length; i++) {
result.push(res.rows.item(i));
}
return result;
}, function (err) {
console.log(err);
}));
}
});

And change in controller.js

$scope.GetCatByName = function (namepara) {
ToList.select("Select * from Category where name like '%" + "?" + "%'", [namepara]).then(function (res) {
$scope.Categories = res;
});
};

But it’s still not work.

Anybody idea about this.