-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
135 lines (117 loc) · 4.13 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en-US" data-ng-app="angularjs.sg">
<head>
<title>REST call app</title>
<meta charset="utf-8" />
<!-- Vendor Styles -->
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="app/app.css" rel="stylesheet" type="text/css"/>
</head>
<body data-ng-controller="AppCtrl as appCtrl">
<!-- Top navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">REST app</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
</ul>
</div>
</div>
</nav>
<!-- Body Containter -->
<div class="container">
<!-- New item form -->
<div class="row">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">New item</h3>
</div>
<div class="panel-body grey-bg">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="field-1">Field 1</label>
<div class="col-sm-4">
<input
id="field-1"
type="text"
class="form-control"
data-ng-model="appCtrl.newItem.field1"
placeholder="Field 1..."/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="field-2">Field 2</label>
<div class="col-sm-4">
<input
id="field-2"
type="text"
class="form-control"
data-ng-model="appCtrl.newItem.field2"
placeholder="Field 2..."/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="field-3">Field 3</label>
<div class="col-sm-4">
<input
id="field-3"
type="text"
class="form-control"
data-ng-model="appCtrl.newItem.field3"
placeholder="Field 3..."/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="field-4">Field 4</label>
<div class="col-sm-4">
<input
id="field-4"
type="text"
class="form-control"
data-ng-model="appCtrl.newItem.field4"
placeholder="Field 4..."/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-4">
<button class="btn btn-default" data-ng-click="appCtrl.pushItem()">Add</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Itemlist panel -->
<div class="row">
<div class="list-group">
<a href="#" class="list-group-item active" data-ng-bind="appCtrl.itemList.title"></a>
<a href="#" class="list-group-item" data-ng-repeat="item in appCtrl.itemList">
<h4 class="list-group-item-heading">
{{item.field1}}
</h4>
<p class="list-group-item-text">{{item.field2}}</p>
</a>
</div>
</div>
</div>
<!-- Vendor Scripts -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-resource/angular-resource.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<!-- App Scripts -->
<script src="app/app.js"></script>
<script src="app/app-controller.js"></script>
<script src="app/resource-factory.js"></script>
</body>
</html>