Autocomplete text box not working in ng repeat. If i type on text box then name is getting but not selecting into autocomplete t
<tr id='addr{{$index}}' ng-repeat="items in calories track by $index"> <td style="border:none;border:0px;"> <div class="input-group" style="width:320px;"> <span class="input-group-addon"><i class="fa fa-cutlery" style="font-size:20px;"></i></span> <!--<input id="email" type="text" class="form-control" name="email" placeholder="Food Ingediants">--> <input type="text" ng-model="item" ng-keyup="complete(item)" class="form-control" /> <span class="list-group-item" ng-repeat="data in filterItem" ng-click="fillTextbox(data,$index)">{{data.ItemsName}}</span> </div> </td> </tr> <script> $scope.complete = function (string) { var output = []; angular.forEach($scope.itemList, function (item) { console.log('item', item.ItemsName, string); if (item.ItemsName.toString().toLowerCase().indexOf(string.toString().toLowerCase()) >= 0) { output.push(item); } }); $scope.filterItem = output; } $scope.fillTextbox = function (string,index) { console.log('string>>>>>>>>>>>>>>>>>>>', string,index); $scope.ItemsName = string.ItemsName; $scope.filterItem = null; } </script>