Skip to content

Commit 0107bfc

Browse files
docs(ngSubmit): add link to form docs to discourage double submission
Closes angular#6017
1 parent 9e7cb3c commit 0107bfc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ng/directive/ngEventDirs.js

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

0 commit comments

Comments
 (0)