Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In AngularJS, is there a way to disable the prevention of default action when a form is missing the action attribute?

In my code, I have a form that looks like this:

<form action="" method="post">

By default, AngularJS disables form submissions without an action attribute specified. I understand I can (and should) assign a form action, however I'd like to know if there's a simple way to prevent AngularJS from intercepting this specific form submission event so that it can post normally.

like image 431
Mike Robinson Avatar asked Feb 05 '13 15:02

Mike Robinson


1 Answers

Use action="?" ... Angular is checking !attr.action, which if action == "", is true.

like image 125
Ben Lesh Avatar answered Oct 28 '22 08:10

Ben Lesh