| OLD | NEW |
| (Empty) | |
| 1 part of angular.directive; |
| 2 |
| 3 /** |
| 4 * The form directive listens on submission requests and, depending, |
| 5 * on if an action is set, the form will automatically either allow |
| 6 * or prevent the default browser submission from occurring. |
| 7 */ |
| 8 @NgDirective( |
| 9 selector: 'form', |
| 10 visibility: NgDirective.CHILDREN_VISIBILITY) |
| 11 class NgForm { |
| 12 dom.Element _element; |
| 13 Scope _scope; |
| 14 |
| 15 NgForm(this._scope, this._element) { |
| 16 if(!this._element.attributes.containsKey('action')) { |
| 17 this._element.onSubmit.listen((event) { |
| 18 event.preventDefault(); |
| 19 }); |
| 20 } |
| 21 } |
| 22 } |
| OLD | NEW |