| Index: third_party/pkg/angular/lib/directive/ng_form.dart
|
| diff --git a/third_party/pkg/angular/lib/directive/ng_form.dart b/third_party/pkg/angular/lib/directive/ng_form.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5fc228590fbcd567c6089638b2cd732dc80f2a07
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/lib/directive/ng_form.dart
|
| @@ -0,0 +1,22 @@
|
| +part of angular.directive;
|
| +
|
| +/**
|
| + * The form directive listens on submission requests and, depending,
|
| + * on if an action is set, the form will automatically either allow
|
| + * or prevent the default browser submission from occurring.
|
| + */
|
| +@NgDirective(
|
| + selector: 'form',
|
| + visibility: NgDirective.CHILDREN_VISIBILITY)
|
| +class NgForm {
|
| + dom.Element _element;
|
| + Scope _scope;
|
| +
|
| + NgForm(this._scope, this._element) {
|
| + if(!this._element.attributes.containsKey('action')) {
|
| + this._element.onSubmit.listen((event) {
|
| + event.preventDefault();
|
| + });
|
| + }
|
| + }
|
| +}
|
|
|