-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (50 loc) · 1.6 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
<!DOCTYPE html>
<html>
<head>
<title>Rob Rothe | AngularJS Sample</title>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
<style>
form {
margin:20px 0;
}
</style>
<script src="assets/bower_components/angular/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body>
<div ng-app="app">
<div style="background:#F76071;padding:10px;text-align:center;">
<h4><a href="http://robrothedev.com/#skills" style="color:#fff;">www.robrothedev.com</a></h4>
</div>
<div class="container">
<h1>Simple Angular List</h1>
<div ng-controller="FormCtrl as form_ctrl">
<form class="form-inline" ng-submit="form_ctrl.save()">
<div class="form-group">
<input type="text" ng-model="form_ctrl.form_data.name" class="form-control" placeholder="Person">
</div>
<div class="form-group">
<input type="text" ng-model="form_ctrl.form_data.band" class="form-control" placeholder="Band">
</div>
<button type="submit" class="btn btn-primary" ng-disabled="form_ctrl.disable_save">Save</button>
<button type="button" class="btn btn-default" ng-click="form_ctrl.cancel()">Cancel</button>
</form>
</div>
<div ng-controller="ListCtrl as list_ctrl">
<table class="table">
<tr ng-repeat="m in list_ctrl.musicians | orderBy:'name'">
<td>{{m.id}}</td>
<td>{{m.name}}</td>
<td>{{m.band}}</td>
<td class="text-right">
<button ng-click="list_ctrl.edit(m)" class="btn btn-link">Edit</button>
<button ng-click="list_ctrl.delete(m)" class="btn btn-link">Delete</button>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>