Last active
August 29, 2015 14:02
-
-
Save renatocantarino/5783ae4033882893ad50 to your computer and use it in GitHub Desktop.
HTML angularJS controller
This file contains hidden or 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> | |
<head> | |
<title>TRABALHANDO COM CONTROLLERS</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript" src="contatos.js"> </script> | |
</head> | |
<body> | |
<div ng-controller='ContatoController'> | |
Nome : <input type="text" ng-model='novo' /> | |
<button ng-click='adicionar()'> Salvar</button> | |
<h2>Lista de contatos</h2> | |
<ul> | |
<li ng-repeat="item in contatos"> {{ item}} </li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment