-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
40 lines (40 loc) · 1.59 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
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='./css/bootstrap.css' />
<script type="text/javascript" src="./js/angular.min.js"></script>
<script type="text/javascript" src="./js/angular-cart.js"></script>
</head>
<body>
<div class="wrapper" ng-app="cartshopping">
<h2>購物車清單</h2>
<div class="widget">
<div class="table-overflow" ng-controller="showcase">
<table class="table table-bordered table-checks">
<thead>
<tr>
<th>刪除</th>
<th>商品圖樣</th>
<th>商品名稱</th>
<th><a ng-click="cartsort = 'singleprice';reverse=!reverse">售價(可點選排序)</a></th>
<th><a ng-click="cartsort = 'numbers';reverse=!reverse">數量(可點選排序)</a></th>
<th><a ng-click="cartsort = 'thistotalprice';reverse=!reverse">總價(可點選排序)</a></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="data in cartdatas | orderBy:cartsort:reverse">
<td><input type="checkbox" ng-click="deletethis(data.thistotalprice,data.num)" delete></td>
<td>這裡放圖片</td>
<td>{{data.productname}}</td>
<td>{{data.singleprice}}</td>
<td><input type="text" name="regular" class="span12" ng-model="data.numbers" ng-change="countthis(data.numbers,data.singleprice,data.num)"></td>
<td>{{data.thistotalprice}}</td>
</tr>
</tbody>
</table>
<p>總價:{{caculatecount}}</p>
</div>
</div>
</div>
</body>
</html>