-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
44 lines (43 loc) · 1.36 KB
/
index.html
File metadata and controls
44 lines (43 loc) · 1.36 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
<!DOCTYPE html>
<html ng-app="store">
<head>
<link rel="stylesheet" type="text/css" href="lib/css/bootstrap.min.css" />
<script type="text/javascript" src="lib/js/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body class="container-fluid" ng-controller="StoreController as store">
<div>
<h1 style="float:left">Catalog</h1>
<button ng-show="getCart().length"
class="btn btn-success pull-right"
style="margin-top:25px">
Checkout {{getCartPrice()}} €
</button>
</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>€</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<tbody>
<div>
<tr ng-repeat="product in products"
ng-class="{'success' : product.inCart}"
ng-click="changeInCartState(product)">
<td>{{product.name}}</td>
<td>{{product.price}}</td>
<td>{{product.description}}</td>
<td width="30%">
<input type="checkbox" class="pull-right" ng-model="product.inCart"/>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>