Created
January 10, 2016 12:54
-
-
Save leosilvadev/e82297d9797180828759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DOCTYPE html> | |
<html ng-app="usuarios"> | |
<head> | |
<style> | |
@IMPORT url("bootstrap-3.3.6-dist/css/bootstrap.min.css"); | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row" ng-controller="UsuariosController"> | |
<div class="well col-sm-12"> | |
<table class="table table-hover table-bordered"> | |
<thead> | |
<tr> | |
<th colspan="3"> | |
<input class="form-control" ng-model="textoPesquisa"> | |
</th> | |
</td> | |
<tr> | |
<th>Nome</th> | |
<th>Apelido</th> | |
<th>Idade</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr ng-repeat="usu in usuarios | filter:{nome:textoPesquisa}"> | |
<td>{{usu.nome}}</td> | |
<td>{{usu.apelido}}</td> | |
<td>{{usu.idade}}</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<div class="well col-sm-12"> | |
<form> | |
<div class="row"> | |
<div class="col-sm-4"> | |
<input ng-model="usuario.nome" class="form-control"> | |
</div> | |
<div class="col-sm-4"> | |
<input ng-model="usuario.apelido" class="form-control"> | |
</div> | |
<div class="col-sm-2"> | |
<input ng-model="usuario.idade" type="number" class="form-control"> | |
</div> | |
<div class="col-sm-2"> | |
<button ng-click="adicionar(usuario)" class="btn btn-primary">Salvar</button> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
</div> | |
<script src="angular.min.js"></script> | |
<script src="js/modules/usuario/modulo.js"></script> | |
<script src="js/modules/usuario/controller.js"></script> | |
<script src="js/modules/usuario/usuarios.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment