forked from eowo/angular-horizontal-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
44 lines (37 loc) · 1.34 KB
/
demo.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!-- bower:js -->
<script src="vendor/angular/angular.js"></script>
<script src="vendor/moment/moment.js"></script>
<script src="vendor/moment-range/lib/moment-range.js"></script>
<script src="vendor/angular-sanitize/angular-sanitize.js"></script>
<!-- endbower -->
<!-- bower:css -->
<!-- endbower -->
<script src="angular-horizontal-timeline.js"></script>
<link rel="stylesheet" href="angular-horizontal-timeline.css">
<style type="text/css">
body {
margin: 0;
}
</style>
<script type="text/javascript">
var demoApp = angular.module('demoApp', ['angular-horizontal-timeline']);
demoApp.controller('demoCtrl', function ($scope) {
$scope.startDate = moment().subtract(2, 'months').format('YYYY-MM-DD');
$scope.endDate = moment().add(2, 'months').format('YYYY-MM-DD');
$scope.events = [{'start_date': moment().subtract(7, 'days').format('YYYY-MM-DD'), 'end_date': moment().add(7, 'days').format('YYYY-MM-DD'), 'content':'<p>lorem ipsum</p>', 'color':'#0033CC'},
{'start_date': moment().subtract(6, 'days').format('YYYY-MM-DD'), 'content':'<p>dolor sit</p>', 'color':'#DC143C'}];
});
</script>
</head>
<body ng-app="demoApp" ng-controller="demoCtrl">
<horizontal-timeline
start-date="{{startDate}}"
end-date="{{endDate}}"
events="events">
</horizontal-timeline>
</body>
</html>