Good afternoon, tell me how to filter the list in angularjs.

there is

app.controller('StudentsCtrl', function($scope, $routeSegment, $http) { $http.get('api/getstudents'). success(function(data, status, headers, config) { $scope.Students= data; }); }); 

 <div class="well" style= "height: 100%; overflow: scroll;" ng-controller="StudentsCtrl"> <ul class="nav nav-list"> <li > Поиск<input type="text"></input> </li> <li class="nav-header">Студенты</li> <li ng-repeat="Student in Students" > <a ng-href="#">{{$index+1}}-{{Student.Fio}}- id{{Student.id}}</a> </li> </ul> </div> 

I want the user to enter characters into the search field and immediately see the filtered data (where Fio 1 starts with the same characters 2) or contains such characters).
Tell me, please, how to do this? Thank.

    1 answer 1

    Suddenly, the very first example in the documentation does what you need: https://docs.angularjs.org/api/ng/filter/filter