-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (45 loc) · 1.39 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
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Agenda Telefonica</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/estilo.css">
</head>
<script src="js/angular.js"> </script>
<div ng-app="myApp" ng-controller="myCtrl">
<div class="topo"> <h2> Agenda telefônica </h2></div>
<div id="formulario">
<form>
<input class="form-control" type="text" placeholder="Nome" ng-model="contato.nome">
<input class="form-control" type="number" placeholder="Telefone" ng-model="contato.telefone">
<input class="form-control" type="email" placeholder="Email" ng-model="contato.email">
<center> <div>
<button class="btn btn-success" ng-click="adicionarContato(contato)">Adicionar</button>
<button class="btn btn-danger" ng-click="removerContato(agenda)">Remover</button>
<button class="btn btn-info" ng-click="atualizarContatos()">Atualizar</button>
</form>
</div></center>
</div>
<!-- view da agenda -->
<div class="tabela">
<table class="table table-striped">
<tr>
<th> # </th>
<th> Nome</th>
<th> Telefone </th>
<th> Email</th>
</tr>
<tr ng-repeat="contatos in agenda">
<td> {{ contatos.id }}</td>
<td> {{ contatos.nome }}</td>
<td> {{ contatos.telefone }}</td>
<td> {{ contatos.email }}</td>
</tr>
</table>
</div>
</div>
<script src="js/code.js">
</script>
</body>
</html>