-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample.html
More file actions
40 lines (40 loc) · 1.59 KB
/
example.html
File metadata and controls
40 lines (40 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
<!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/dist/css/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/lodash.js"></script>
<script src="./bower_components/select2/dist/js/select2.full.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';
$scope.timezone = 'Asia/Chongqing';
}]);
</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>
<option value="US">USA</option>
</select>
Timezone:
<select class="timezone-select" timezone-select data-ng-model="timezone" data-country="country" data-i18n-common="Common Timezones"></select>
<div>Selected: {{ timezone }}</div>
</div>
</body>
</html>