-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
69 lines (60 loc) · 1.54 KB
/
index.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html ng-app="ExampleApp">
<head>
<title>Angular directives for scroll events</title>
<meta name="viewport" content="width=500,user-scalable=0">
<style>
body {
box-sizing: border-box;
width: 500px;
height: 100vh;
min-height: 100vh;
margin: 0;
padding: 15px;
color: #333;
font-family: sans-serif;
}
</style>
</head>
<body ng-controller="MainCtrl">
<h2>angular-scroll-events</h2>
<p>(all events are logged to the console)</p>
<br />
<br />
<br />
<br />
<br />
<pre>
<h1 scroll-up="log('scroll up')">↑ Scroll Up</h1>
</pre>
<h1 scroll-up="log('scroll up')">↑ Scroll Up</h1>
<br />
<br />
<br />
<br />
<br />
<pre>
<h1 scroll-down="log('scroll down')">↓ Scroll Down</h1>
</pre>
<h1 scroll-down="log('scroll down')">↓ Scroll Down</h1>
<br />
<br />
<br />
<br />
<br />
<pre>
<h1 scroll-up="log('scroll up')" scroll-down="log('scroll down')">↓↑ Scroll Up or Down</h1>
</pre>
<h1 scroll-up="log('scroll up')" scroll-down="log('scroll down')">↓↑ Scroll Up or Down</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js" charset="utf-8"></script>
<script src="dist/scroll-events.min.js"></script>
<script>
angular.module('ExampleApp', ['g1b.scroll-events']).
controller('MainCtrl', function ($scope) {
$scope.log = function (e) {
console.log('event fired:', e);
};
});
</script>
</body>
</html>