<html>
<div
ng-controller="FilterController">
<div>
Enter the character:
<input type="text"
name="searchname" ng-model="searchname">
<div
ng-hide="users"></div>
<table>
<tr ng-repeat="a in users |
filter : searchname"ng-show="searchname">
</tr>
</table>
</div>
</div>
<script>
var mainApp = angular.module("mainApp",
[]);
mainApp.controller("FilterController",
function ($scope) {
$scope.users = [{
name: "Red",
}, {
name: "Yellow",
},{
name: "Green",
}, {
name: "Brown",
}, {
name: "Pink",
}];
</script>
</body>