-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshop.html
36 lines (31 loc) · 1.37 KB
/
shop.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
<div class="form-group col-lg-3">
<label for="search">Search</label>
<input id="search" type="text" class="form-control" placeholder="Enter search term" ng-model="search">
<p ng-show="search">Du suchst gerade nach <b>{{search}}</b></p>
<p ng-hide="search">Du suchst gerade gar nichts.</p>
<p ng-show="search">Uppercase: {{search.toUpperCase()}}</p>
</div>
<div class="col-lg-3">
<table class="table" ng-controller="ArticlesCtrl">
<tr ng-repeat="article in articles | filter:search">
<td>{{article.id}}</td>
<td>{{article.name}}</td>
<td><span class="price" data-value="item.price"></span></td>
<td><a href class="btn btn-primary btn-xs" ng-click="cart.addArticle(article);">Hinzufügen</a></td>
</tr>
</table>
</div>
<div class="col-lg-3" ng-controller="CartCtrl">
<div ng-hide="cart.getItems().length" class="alert alert-warning">Ihr Warenkorb ist noch leer.</div>
<table ng-show="cart.getItems().length" class="table">
<tr ng-repeat="item in cart.getItems() track by $index" class="cart-item">
<td>{{item.name}}</td>
<td><span class="price" data-value="item.price"></span></td>
</tr>
<tr>
<td>{{cart.getItems().length}} Artikel</td>
<td>{{cart.sum() | currency}}</td>
<td></td>
</tr>
</table>
</div>