Friday, August 26, 2016

Search /Filter in Angular JS

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>

No comments:

Post a Comment