<html>
<head><script
src="angular.min.js"></script></head>
<body
ng-app="mainApp" ng-controller="FilterController">
<div
ng-controller="FilterController">
<div>Enter
the Search Keyword:
<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">
<td>{{a.name}}</td>
</tr>
</table>
</div>
</div>
<script>
var
mainApp = angular.module("mainApp", []);
mainApp.controller("FilterController",
function ($scope) {
$scope.users
= [{
name:
"Apple",
},
{
name:
"Berry",
},
{
name:
"Orange",
},
{
name:
"Pinnaple",
}];
});
</script>
</body>
</html>