Мое решение: AngularJS - Таблица поиска - Таблица фильтров, td {border: 1px solid grey; border-collapse: collapse; пограничный крах: сбой; padding: 5px; padding: 5px; } }
<body>
<div ng-app="myApp" ng-controller="namesCtrl"/>
<p>Filtering input:</p>
<p><input type="text" data-ng-model="search.City"></p>
<table>
<tr data-ng-repeat="x in names | filter: search: strict ">
<td> {{ x.Name }}</td>
<td>{{ x.City }} </td>
<td> {{ x.Country }}</td>
</tr>
</table>
<p>{{ City | lowercase }}</p>
<script>
var app = angular.module('myApp', []);
app.controller('namesCtrl', function($scope, $http) {
$http.get("names.js")
.success(function (response) {$scope.names = response.records;});
});
</script>
</body>
</html>
The above code displays the data from the table from the column "City". But I have a duplicate like,"Sao" and "sao". When the user searches for "Sao" the returned value should be the row of data which contains "Sao" as the city.
Взгляните на этот ответ - это еще одна статья.
qaru.site/questions/8771185/...
Вы также можете обновить функцию компаратора (если требуется) из упомянутого ответа, чтобы включить ваши требования.