forked from mishguruorg/angular-timezone-selector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
38 lines (38 loc) · 1.44 KB
/
example.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
<!doctype html>
<html lang="en" data-ng-app="timezoneSelectExample">
<head>
<meta charset="UTF-8" />
<title>Angular timezone select example</title>
<link rel="stylesheet" href="./bower_components/select2/select2.css">
<style>
.timezone-select {
min-width: 300px;
}
</style>
<script src="./bower_components/jquery/dist/jquery.js"></script>
<script src="./bower_components/angular/angular.js"></script>
<script src="./bower_components/lodash/dist/lodash.js"></script>
<script src="./bower_components/select2/select2.js"></script>
<script src="./bower_components/moment/min/moment.min.js"></script>
<script src="./bower_components/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
<script src="./dist/angular-timezone-select.js"></script>
<script type="text/javascript">
angular.module('timezoneSelectExample', ['angular-timezone-select'])
.controller('TimezoneSelectCtrl', ['$scope', function($scope) {
$scope.country = 'CN';
}]);
</script>
</head>
<body>
<div data-ng-controller="TimezoneSelectCtrl">
Country:
<select data-ng-model="country">
<option value="CN">China</option>
<option value="NZ">New Zealand</option>
</select>
Timezone:
<input class="timezone-select" timezone-select data-ng-model="timezone" country="country">
<div>Selected: {{ timezone }}</div>
</div>
</body>
</html>