Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active March 8, 2018 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f0d3ee1913bf9a5af5ba6e9be5d78122 to your computer and use it in GitHub Desktop.
Save parzibyte/f0d3ee1913bf9a5af5ba6e9be5d78122 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Ejemplo de formulario</title>
<!-- Cargar la librería principal -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<!-- Como nuestro script no será muy grande, podemos ponerlo en el HTML -->
<script>
angular
.module("formularios", [])
.controller("ControladorPrincipal", [function(){
/*
Aquí la magia
*/
}]);
</script>
</head>
<body ng-app="formularios">
<div ng-controller="ControladorPrincipal">
<h2>Nueva mascota</h2>
<form>
<label for="nombre">Nombre: </label><br>
<input id="nombre" type="text" placeholder="¿Cómo se llama la mascota?">
<br><br>
<label for="raza">Raza: </label><br>
<input id="raza" type="text" placeholder="¿Cuál es su raza?">
<br><br>
<label for="edad">Edad: </label><br>
<input id="edad" type="number" placeholder="¿Cúantos años tiene?">
<br><br>
<button>Guardar</button>
</form>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment