Search action Angular JS
<div ng-app="mysearch" ng-controller="namesearch">
<p><input type="text" ng-model="test"></p>
<ul>
<li ng-repeat="x in name | filter:test">
{{ x }}
</li>
</ul>
</div>
<script>
angular.module('mysearch', []).controller('namesearch', function($scope) {
$scope.name = [
'Ram',
'Nandu',
'vel',
'mani',
'jubi',
];
});
</script>
<div ng-app="mysearch" ng-controller="namesearch">
<p><input type="text" ng-model="test"></p>
<ul>
<li ng-repeat="x in name | filter:test">
{{ x }}
</li>
</ul>
</div>
<script>
angular.module('mysearch', []).controller('namesearch', function($scope) {
$scope.name = [
'Ram',
'Nandu',
'vel',
'mani',
'jubi',
];
});
</script>
No comments:
Post a Comment