From b7a2deed3000d64cf63d2f2d8719cac7fa97f469 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 31 Jul 2014 21:26:27 +0100 Subject: [PATCH] docs(ngSubmit): add link to `form` docs to discourage double submission Closes #6017 --- src/ng/directive/ngEventDirs.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index ed8ddd6b..bfddc720 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -307,6 +307,13 @@ forEach( * server and reloading the current page), but only if the form does not contain `action`, * `data-action`, or `x-action` attributes. * + *
+ * **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and + * `ngSubmit` handlers together. See the + * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation} + * for a detailed discussion of when `ngSubmit` may be triggered. + *
+ * * @element form * @priority 0 * @param {expression} ngSubmit {@link guide/expression Expression} to eval.