Skip to content

Commit d63fb17

Browse files
ZeeStormSebastien Armand - sa250111
authored and
Sebastien Armand - sa250111
committed
docs(ngSubmit): ngSubmit also works with the data-action/x-action attributes
The documentation states only the "action" attribute triggers this, which is incorrect. When using the attribute "data-action" (as for AJAX control, attempting to bypass the "action" attribute but still make it obvious what its for), Angular thinks this is also classified as "action" and continues with the page submission. Closes angular#6196
1 parent 9d9ff8f commit d63fb17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/directive/ngEventDirs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ forEach(
298298
* Enables binding angular expressions to onsubmit events.
299299
*
300300
* Additionally it prevents the default action (which for form means sending the request to the
301-
* server and reloading the current page) **but only if the form does not contain an `action`
302-
* attribute**.
301+
* server and reloading the current page), but only if the form does not contain `action`,
302+
* `data-action`, or `x-action` attributes.
303303
*
304304
* @element form
305305
* @priority 0

0 commit comments

Comments
 (0)