-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (29 loc) · 1.23 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta name="description" content="AngularJS directive to keep only numbers when typing in input fields">
<meta name="keywords" content="AngularJS, directive, input, numbers">
<meta name="author" content="Alexandru Costin Dumitru (AlexCD)">
<meta charset="UTF-8">
<title>AngularInputOnlyNumbers</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<script type="text/javascript" src="js/lib/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/lib/angular.min.js"></script>
<!--directives-->
<script type="text/javascript" src="js/directives/inputOnlyNumbers.js"></script>
<!--modules-->
<script type="text/javascript" src="js/modules/directives.js"></script>
<script type="text/javascript" src="js/modules/modules.js"></script>
</head>
<body ng-app="modules">
<form name="theForm">
<div>Min: 10</div>
<input type="text" ng-model="model" min="10" max="100" input-only-numbers />
<div>Max: 100</div>
</form>
<div id="errorMsg">
<span ng-show="theForm.$error.rangeError">Invalid range</span>
<div ng-show="!theForm.$error.rangeError">Valid range</div>
</div>
</body>
</html>