var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope, $timeout) {
$scope.search = {};
$scope.Geojson = [];
$timeout(function () {
$scope.Geojson = [{
name: "abc",
id: 5
}, {
name: "abcde",
id: 7
}, {
name: "abcdef",
id: 8
}, {
name: "cde",
id: 6
}]
}, 500)
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>
document.write('<base href="' + document.location + '" />');
</script>
<link href="style.css" rel="stylesheet" />
<script data-semver="1.3.13" src="//code.ionicframework.com/nightly/js/ionic.bundle.js" data-require="angular.js@1.3.x"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
FilteredGeojson.length :- {{FilteredGeojson.length}}
<br>
<input type="search" ng-model="search.name" placeholder="Name" /> {{ search }}
<input type="number" ng-model="limit" placeholder="limitTo" /> {{ search }}
<table >
<tr ng-repeat="item in (FilteredGeojson = (Geojson | filter:search)) | limitTo:limit track by item.id">
<td>{{ item.name }}</td>
</tr>
</table>
</body>
</html>
/* Put your css in here */