Last active
August 29, 2015 14:17
-
-
Save ralfting/d767dc4feba8fff4a967 to your computer and use it in GitHub Desktop.
index ng-model
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> | |
<!-- inserido ng-app --> | |
<html ng-app> | |
<head> | |
<title>My Angular App</title> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> | |
<style type="text/css"> | |
body{padding-top:25px;} | |
.name{color:#F00;text-decoration:underline} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<h3>AngularJS - Code Tython</h3><br/> | |
<form class="form-horizontal"> | |
<div class="form-group"> | |
<label class="col-sm-2 control-label">Nome</label> | |
<div class="col-sm-10"> | |
<!-- inserido ng-model --> | |
<input type="text" class="form-control" placeholder="Digite um nome" ng-model="name"> | |
</div> | |
</div> | |
</form> | |
O nome digitado é <span class="name">{{name}}</span> ! | |
</div> | |
</div> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> | |
<!-- Bootstrap 3.3.2 --> | |
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | |
<!-- AngularJS 1.3.14 --> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment