-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindsec3.htm
executable file
·61 lines (36 loc) · 1.79 KB
/
indsec3.htm
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
<!DOCTYPE html>
<html lang="en-us" ng-app="myApp">
<head>
<title>Learn and Understand AngularJS</title>
<!-- load bootstrap and fontawesome locally -->
<link rel="stylesheet" href="bootstrap.min.css" />
<script src="angular.min.js"></script>
<script src="angular-messages.min.js"></script>
<script src="angular-resource.min.js"></script>
<!--
<script src="appsec3.11.js"></script>
<script src="appsec3.12.js"></script>
<script src="appsec3.14.js"></script>
<script src="appsec3.15.js"></script>
-->
<script src="appsec3.15.js"></script>
</head>
<body>
<div class="container">
<div ng-controller="mainController">
<h1>Hello world -- i'm indsec3 !</h1>
</div>
</div>
<!-- ------------------------- Form validation -- used in sec 3.14 -------------------->
<form name="myForm">
This is an input test field: <input type="text" ng-model="field" name="myField" required minlength="5" />
<div ng-messages="myForm.myField.$error">
<!-- This "alert-danger" thing is from bootstrap, gives the red color to the warning -->
<div class="alert alert-danger" ng-message="required">You did not enter nuttin' yet </div>
<div ng-message="minlength">The value entered is too short, less than 5 char, keep it going, till the sun goes down! </div>
</div>
</form>
<!-- -------------- Sec 3.15 -------------------->
<script src="appsec3.15.js"></script>
</body>
</html>