Skip to content

Instantly share code, notes, and snippets.

@gnschenker
Created May 14, 2014 02:46
Show Gist options
  • Save gnschenker/c61160e04190f452a354 to your computer and use it in GitHub Desktop.
Save gnschenker/c61160e04190f452a354 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Angular Form Sample</title>
</head>
<body ng-app>
<div>
<form name='loginForm' novalidate>
<label>User name:</label>
<input type='text' ng-model='login.userName' required/>
<br>
<label>Password:</label>
<input type='password' ng-model='login.password' required/>
<br>
<button>Login</button>
</form>
<div>
<h3>Some form properties</h3>
<div>The form is valid: {{loginForm.$valid}}</div>
<div>The form is invalid: {{loginForm.$invalid}}</div>
</div>
</div>
<script src='bower_components/angular/angular.js'></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment