forked from ccoenraets/forceng
-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
68 lines (62 loc) · 3.07 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
<html>
<head>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body ng-app="demoApp">
<div class="navbar navbar-default navbar-fixed-top" role="navigation" ng-controller="NavbarCtrl">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="#">ForceNG</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#" ng-click="login()">Login</a></li>
<li><a href="#" ng-click="discardToken()">Discard Token</a></li>
<li><a href="#" ng-click="isLoggedIn()">Is Logged In?</a></li>
</ul>
</div>
</div>
</div>
<div class="container" style="padding-top: 70px;" ng-controller="ContactCtrl">
<div class="row">
<div class="col-xs-12 col-sm-4">
<p><button type="button" class="btn btn-default" ng-click="query()"><i
class="glyphicon glyphicon-refresh"></i> Get Contacts</button></p>
<ul id="list" class="list-group">
<a ng-repeat="item in contacts" href="#" class="list-group-item" ng-click="retrieve(item.Id)">{{item.FirstName}} {{item.LastName}}</a>
</ul>
</div>
<div class="col-xs-12 col-sm-8">
<p><button type="button" class="btn btn-default" ng-click="newContact()"><i class="glyphicon glyphicon-plus"></i> New</button></p>
<form role="form">
<div class="form-group">
<label for="contactId">Id</label>
<input type="text" class="form-control" id="contactId" ng-model="contact.Id" disabled>
</div>
<div class="form-group">
<label for="firstName">First Name</label>
<input type="text" class="form-control" id="firstName" ng-model="contact.FirstName">
</div>
<div class="form-group">
<label for="lastName">Last Name</label>
<input type="text" class="form-control" id="lastName" ng-model="contact.LastName">
</div>
<button type="button" class="btn btn-default" ng-if="!contact.Id" ng-click="create()">Create</button>
<button type="button" class="btn btn-default" ng-if="contact.Id" ng-click="update()">Update</button>
<button type="button" class="btn btn-default" ng-if="contact.Id" ng-click="del()">Delete</button>
</form>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="forceng.js"></script>
<script src="app.js"></script>
<script src="controllers.js"></script>
</body>
</html>