-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (39 loc) · 1.79 KB
/
index.html
File metadata and controls
45 lines (39 loc) · 1.79 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="google" value="notranslate">
<title>AngularJS Directive Form Validation</title>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'>
</head>
<body>
<div data-ng-app="ngDirectiveForms" ng-controller="mainController">
<div id="main" class="container">
<h1>Review Order</h1>
<form name="parentForm" novalidate>
<div ng-repeat="gift in gifts" class="row">
<div class="col-lg-12" ng-if="gift.product.type == 'A'" data-product-A
data-register-form-scope="registerFormScope" data-gift-data="gift.giftData"
data-validate-child-form="validateChildForm" data-product="gift.product"></div>
<div class="col-lg-12" ng-if="gift.product.type == 'B'" data-product-B
data-register-form-scope="registerFormScope" data-gift-data="gift.giftData"
data-validate-child-form="validateChildForm" data-product="gift.product"></div>
<hr/>
</div>
</form>
<div class="row">
<div class="col-lg-12">
<button class="btn btn-primary" data-ng-click="checkout()">Checkout</button>
<div class="alert alert-success" style="margin-top:10px;" data-ng-show="formsValid">All forms are valid!
</div>
</div>
</div>
</div>
</div>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js'></script>
<script src="app/scripts/app.js"></script>
<script src="app/scripts/controller/main.js"></script>
<script src="app/scripts/directives/productA.js"></script>
<script src="app/scripts/directives/productB.js"></script>
</body>
</html>