aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget/form.js
diff options
context:
space:
mode:
authorVojta Jina2011-11-24 19:28:09 -0800
committerIgor Minar2011-12-06 13:07:26 -0800
commitc9f2b1eec5e8a9eaf10faae8a8accf0b771096e0 (patch)
treec1393db839d77ea3816956e7c8a2030079fb5e7a /src/widget/form.js
parent163e05ed36deecb341092296186ef6c5cd00f426 (diff)
downloadangular.js-c9f2b1eec5e8a9eaf10faae8a8accf0b771096e0.tar.bz2
feat(form): do not prevent submission if action attribute present
Diffstat (limited to 'src/widget/form.js')
-rw-r--r--src/widget/form.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget/form.js b/src/widget/form.js
index 51864cf0..76051832 100644
--- a/src/widget/form.js
+++ b/src/widget/form.js
@@ -61,8 +61,8 @@ angularWidget('form', function(form){
parentForm = $formFactory.forElement(formElement),
form = $formFactory(parentForm);
formElement.data('$form', form);
- formElement.bind('submit', function(event){
- event.preventDefault();
+ formElement.bind('submit', function(event) {
+ if (!formElement.attr('action')) event.preventDefault();
});
if (name) {
this[name] = form;