Skip to content

Commit 91a1562

Browse files
committed
adds a file to demonstrate events
1 parent 6b95a8c commit 91a1562

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

05-1-event.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Events</title>
5+
<style>.panel{background-color:gray; display:inline-block;margin:1px; min-width:50px; min-height:50px}</style>
6+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.11/angular.min.js"></script>
7+
<script>
8+
var myApp = angular.module('myApp', []);
9+
myApp.controller('MyCtrl', function($scope){
10+
$scope.e = 'nothing up yet';
11+
});
12+
13+
</script>
14+
</head>
15+
<body>
16+
<div ng-app='myApp' ng-controller='MyCtrl'>
17+
<div class="panel" ng-click="e=$event">Click to see event: {{e.clientX}}</div>
18+
<div class="panel" ng-dblclick="e=$event">Double Click to see event: {{e.clientX}}</div>
19+
<div class="panel" ng-mousemove="e=$event">Movemouse over here to see event: {{e.clientX}}</div>
20+
<div class="panel" ng-mousedown="e=$event">Mouse down to see event: {{e.clientX}}</div>
21+
<div class="panel" ng-mouseenter="e=$event">Mouse enter to see event: {{e.clientX}}</div>
22+
</div>
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)