-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (44 loc) · 1.32 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
41
42
43
44
45
46
<!doctype html>
<html lang="pt" ng-app>
<head>
<meta charset="utf-8">
<script src="lib/angular.min.js"></script>
<script src="app/lista-compras.js"></script>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/lista-compras.css">
<title>Lista de Compras com Framework AngularJs</title>
</head>
<body>
<div class="container" ng-controller="ListaComprasController">
<div class="row">
<div class="page-header">
<h1>Lista de Compras</h1>
</div>
</div>
<div class="row">
<table id="lista-compras" class="table table-striped">
<thead>
<tr>
<th>Comprado</th>
<th>Produto</th>
<th>Quantidade</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in itens" class="comprado-{{ item.comprado}}">
<td><input type="checkbox" ng-model="item.comprado"></td>
<td><strong>{{ item.produto}}</strong></td>
<td>{{ item.quantidade}}</td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<form class="form-inline" name="formItem">
<input type="text" ng-model="item.produto" placeholder="Produto">
<input type="number" ng-model="item.quantidade" palceholder="Quantidade" class="input-small">
<button class="btn btn-primary" ng-click="adicionaItem()">adicionar ítem</button>
</form>
</div>
</body>
</html>