forked from ManifestWebDesign/angular-gridster
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
79 lines (68 loc) · 2.31 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
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Angular Gridster</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="dist/angular-gridster.min.css" />
<link rel="stylesheet" href="demo/common/style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script src="https://code.angularjs.org/1.2.15/angular-route.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script>
<script src="src/angular-gridster.js"></script>
<script type="text/javascript">
(function() {
angular.module('app', ['gridster', 'ui.bootstrap', 'ngRoute'])
.config(['$routeProvider',
function($routeProvider) {
$routeProvider
.when('/main', {
templateUrl: 'demo/main/view.html',
controller: 'MainCtrl'
})
.when('/dashboard', {
templateUrl: 'demo/dashboard/view.html',
controller: 'DashboardCtrl'
})
.otherwise({
redirectTo: '/main'
});
}
])
.controller('RootCtrl', function($scope) {
$scope.$on('$locationChangeStart', function(e, next, current) {
$scope.page = next.split('/').splice(-1);
$scope.styleUrl = 'demo/' + $scope.page + '/style.css'
});
});
})();
</script>
<script src="demo/main/script.js"></script>
<script src="demo/dashboard/script.js"></script>
</head>
<body ng-app="app">
<div ng-controller="RootCtrl">
<link rel="stylesheet" ng-href="{{ styleUrl }}" />
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<a class="navbar-brand" href="#">Angular Gridster</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li ng-class="{active: page == 'main'}"><a href="#/main">Main Demo</a>
</li>
<li ng-class="{active: page == 'dashboard'}"><a href="#/dashboard">Dashboard Demo</a>
</li>
<li><a>|</a>
</li>
<li>
<a href="coverage" target="_blank" class="code-coverage">Code Coverage</a>
</li>
</ul>
</div>
<div class="container" ng-view></div>
</div>
</body>
</html>