Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b7a2dee

Browse files
docs(ngSubmit): add link to form docs to discourage double submission
Closes #6017
1 parent 98ff901 commit b7a2dee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/ng/directive/ngEventDirs.js

+7
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ forEach(
307307
* server and reloading the current page), but only if the form does not contain `action`,
308308
* `data-action`, or `x-action` attributes.
309309
*
310+
* <div class="alert alert-warning">
311+
* **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and
312+
* `ngSubmit` handlers together. See the
313+
* {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}
314+
* for a detailed discussion of when `ngSubmit` may be triggered.
315+
* </div>
316+
*
310317
* @element form
311318
* @priority 0
312319
* @param {expression} ngSubmit {@link guide/expression Expression} to eval.

0 commit comments

Comments
 (0)