-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
44 lines (35 loc) · 1.75 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
<!DOCTYPE html>
<html lang=en" ng-app="secure-rest-angular-tut">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>secure-rest-angular-tut</title>
</head>
<body ng-controller="MainCtrl">
<h3>Login</h3>
<input ng-model="credentials.username" placeholder="username">
<input ng-model="credentials.password" placeholder="password">
<button ng-click="login()">Login!</button><button ng-click="logout()">Logout...</button><br/>
<br/>
<hr/>
<h3>Calling open (non-secured) services</h3>
<button ng-click="getOpenGreetings()">Get greetings</button> >>> {{greetings.open.getResult}}<br/>
<input ng-model="greetings.open.postValue"/><button ng-click="postOpenGreetings()">Post greetings</button>
<br/>
<hr/>
<h3>Calling secure services</h3>
<button ng-click="getSecureGreetings()">Get secure greetings</button> >>> {{greetings.secure.getResult}}<br/>
<input ng-model="greetings.secure.postValue"/><button ng-click="postSecureGreetings()">Post secure greetings</button>
<br/>
<!-- ANGULAR -->
<script src="js/angular/angular.min.js" type="text/javascript"></script>
<script src="js/angular/angular-cookies.min.js" type="text/javascript"></script>
<script src="js/angular/angular-resource.min.js" type="text/javascript"></script>
<script src="app/main.js" type="application/javascript"></script>
<script src="app/main-controller.js" type="application/javascript"></script>
<script src="app/cookies-service.js" type="application/javascript"></script>
<script src="app/csrf-service.js" type="application/javascript"></script>
<script src="app/login-service.js" type="application/javascript"></script>
</body>
</html>