-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.html
More file actions
43 lines (41 loc) · 1.59 KB
/
Copy pathindex.html
File metadata and controls
43 lines (41 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html ng-app="countriesApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ng-scroll-repeat example</title>
<link href="./css/flag-icon.css" rel="stylesheet">
<link href="./css/docs.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="../dist/ng-scroll-repeat.min.js"></script>
<script src="countries.js"></script>
<script>
var countriesApp = angular.module('countriesApp', ['ks.ngScrollRepeat']);
countriesApp.controller('CountryListController', function($scope) {
$scope.countries = countries;
});
</script>
<style>
.country {
padding: 5px;
font-size: 20px;
}
.search {
margin-bottom: 20px;
padding: 5px;
font-size: 16px;
}
</style>
</head>
<body ng-controller="CountryListController">
<h1>Countries Infinite Scroll with Search</h1>
<input class="search" type="text" ng-model="search" placeholder="Search..."/>
<div ng-scroll-repeat="country in countries | filter: search" page-size="20" tolerance="200">
<div class="country">
<span class="flag flag-icon flag-icon-{{country.code.toLowerCase()}}"></span>
<span><strong>{{country.name}}</strong> (code={{country.code}})</span>
</div>
</div>
</body>
</html>