|
1 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
2 | | -<html xmlns:ng="http://angularjs.org"> |
3 | | - <head ng-app> |
| 2 | +<html xmlns:ng="http://angularjs.org" ng-app> |
| 3 | + <head> |
4 | 4 | <link rel="stylesheet" type="text/css" href="style.css"/> |
5 | 5 | <script type="text/javascript" src="../../../src/angular-bootstrap.js"></script> |
6 | 6 | </head> |
|
26 | 26 | </tr> |
27 | 27 | <tr> |
28 | 28 | <td>hidden</td> |
29 | | - <td><input type="hidden" ng-model="text.hidden" value="hiddenValue" /></td> |
| 29 | + <td><input type="hidden" ng-model="text.hidden" ng-init="text.hidden='hiddenValue'" /></td> |
30 | 30 | <td>text.hidden={{text.hidden}}</td> |
31 | 31 | </tr> |
32 | 32 | <tr><th colspan="3">Input selection field</th></tr> |
33 | | - <tr id="gender-box"> |
| 33 | + <tr id="gender-box" ng-init="gender='male'"> |
34 | 34 | <td>radio</td> |
35 | 35 | <td> |
36 | 36 | <input type="radio" ng-model="gender" value="female"/> Female <br/> |
37 | | - <input type="radio" ng-model="gender" value="male" checked="checked"/> Male |
| 37 | + <input type="radio" ng-model="gender" value="male"/> Male |
38 | 38 | </td> |
39 | 39 | <td>gender={{gender}}</td> |
40 | 40 | </tr> |
41 | 41 | <tr> |
42 | 42 | <td>checkbox</td> |
43 | | - <td> |
44 | | - <input type="checkbox" ng-model="checkbox.tea" checked value="on"/> Tea<br/> |
| 43 | + <td ng-init="checkbox={'tea': true, 'coffee': false}"> |
| 44 | + <input type="checkbox" ng-model="checkbox.tea" value="on"/> Tea<br/> |
45 | 45 | <input type="checkbox" ng-model="checkbox.coffee" value="on"/> Coffe |
46 | 46 | </td> |
47 | 47 | <td> |
|
75 | 75 | <td>ng-change<br/>ng-click</td> |
76 | 76 | <td ng-init="button.count = 0; form.count = 0;"> |
77 | 77 | <form ng-submit="form.count = form.count + 1"> |
78 | | - <input type="button" value="button" ng-change="button.count = button.count + 1"/> <br/> |
79 | | - <input type="submit" value="submit input" ng-change="button.count = button.count + 1"/><br/> |
| 78 | + <input type="button" value="button" ng-click="button.count = button.count + 1"/> <br/> |
| 79 | + <input type="submit" value="submit input" ng-click="button.count = button.count + 1"/><br/> |
80 | 80 | <button type="submit">submit button</button> |
81 | | - <input type="image" src="" ng-change="button.count = button.count + 1"/><br/> |
| 81 | + <input type="image" src="" ng-click="button.count = button.count + 1"/><br/> |
82 | 82 | <a href="" ng-click="button.count = button.count + 1">action</a> |
83 | 83 | </form> |
84 | 84 | </td> |
|
0 commit comments