-
Notifications
You must be signed in to change notification settings - Fork 0
/
shoppingCart.html
58 lines (53 loc) · 1.55 KB
/
shoppingCart.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
<!doctype html>
<html lang='en' ng-app>
<head>
<title>Book Shopping Cart</title>
<script src="angular10.js"></script>
<script src="shoppingCart.js"></script>
<link rel="stylesheet" href="shoppingCart.css">
</head>
<body ng-controller="CartControler" ng-init="dataLoad()">
<table>
<caption><b>My Books</b></caption>
<thead>
<tr>
<th>Title</th>
<th>Qty</th>
<th>UnitPrice</th>
<th>$Unit Price</th>
<th>Line Total</th>
<th>Total {{total|currency}}</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th><button id="new" ng-click="addNew()">New</button></th>
<th><button id="save" ng-click="save()">Save</button></th>
</tr>
</tfoot>
<tbody ng-repeat="book in books">
<tr>
<!--<td>{{book.title}}</td>-->
<td>
<input ng-model="book.title" size="20">
</td>
<td>
<input ng-model="book.qty" size="2">
</td>
<td>
<input ng-model="book.price" size="6">
</td>
<td>{{book.price | currency}}</td>
<td>{{book.price * book.qty | currency}}</td>
<td>
<button ng-click="removeBook($index)">
Remove
</button>
</td>
</tr>
</tbody>
</table>
<b>Book Count : {{count}}</b>
</body>
</html>