-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular.html
39 lines (33 loc) · 1.41 KB
/
angular.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<html>
<head>
<title>angular-bacon example</title>
<script type="text/javascript" src="js/vendor/angular.js"></script>
<script type="text/javascript" src="js/vendor/Bacon.js"></script>
<script type="text/javascript" src="js/vendor/angular-bacon.js"></script>
<script type="text/javascript" src="js/angular.js"></script>
</head>
<body ng-app="example">
<form ng-controller="form">
<label>Username</label>
<br />
<input type="text" ng-model="username" />
<div ng-switch="usernameState">
<span ng-switch-when="empty"></span>
<span ng-switch-when="loading">Loading</span>
<span ng-switch-when="taken">Username '{{username}}' is taken. Try 'user' instead...</span>
<span ng-switch-when="free">Free!</span>
</div>
<label>Password</label>
<br />
<input type="password" ng-model="password" />
<span ng-show="passwordInvalid">Password must be at least five characters long</span>
<br />
<label>Confirm password</label>
<br />
<input type="password" ng-model="passwordConfirm" />
<span ng-show="passwordsDontMatch">Passwords don't match</span>
<br />
<input type="submit" ng-disabled="!formValid" />
</form>
</body>
</html>