Last active
August 29, 2015 14:04
-
-
Save aaizemberg/5f2d2d1147f1e779c1c1 to your computer and use it in GitHub Desktop.
anotador (angular.js)
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
http://www.w3schools.com/angular/default.asp | |
AngularJS History | |
AngularJS is quite new. Version 1.0 was released in 2012. | |
Miško Hevery, a Google employee, started to work on AngularJS in 2009. | |
The idea turned out very good, and the project is now officially backed by Google, with a full time development team. | |
Ejemplos: | |
----------------------------------------------------- | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<div ng-app=""> | |
<p>Name: <input type="text" ng-model="name"></p> | |
<p ng-bind="name"></p> | |
</div> | |
<div ng-app=""> | |
<p>My first expression: {{ 5 + 5 }}</p> | |
</div> | |
<div ng-app="" ng-init="firstName='Ariel'"> | |
<p>The name is <span ng-bind="firstName"></span></p> | |
<p>The name is {{ firstName }}</p> | |
</div> | |
<!-- valid HTML5 --> | |
<div data-ng-app="" data-ng-init="firstName='John'"> | |
<p>The name is <span data-ng-bind="firstName"></span></p> | |
</div> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script> | |
</body> | |
</html> | |
----------------------------------------------------- | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.angularjs.org/1.3.0-beta.5/angular.js"></script> | |
<link rel="stylesheet" href="style.css" /> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<div ng-app=""> | |
<p>Peso: <input type="number" ng-model="peso"></p> | |
<p>Altura [cm]: <input type="number" ng-model="altura"></p> | |
<p>Tu IMC es {{ peso / ((altura/100)*(altura/100)) }} </p> | |
</div> | |
</body> | |
</html> | |
IMC | |
< 18,5 desnutrición | |
(18,5 .. 25) peso ideal | |
> 25 sobrepeso | |
> 30 obesidad leve | |
> 40 obesidad elevada | |
----------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment