From a68624444afcb9e3796b1a751cf3817cafd20240 Mon Sep 17 00:00:00 2001 From: James Wagoner Date: Mon, 10 Feb 2014 00:17:08 -0800 Subject: 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 #6196 --- src/ng/directive/ngEventDirs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index f63d3ca1..45b2d404 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -298,8 +298,8 @@ forEach( * Enables binding angular expressions to onsubmit events. * * Additionally it prevents the default action (which for form means sending the request to the - * server and reloading the current page) **but only if the form does not contain an `action` - * attribute**. + * server and reloading the current page), but only if the form does not contain `action`, + * `data-action`, or `x-action` attributes. * * @element form * @priority 0 -- cgit v1.2.3