![]() |
VOOZH | about |
The ng-submit Directive in AngularJS is used to specify the functions to be run on submit events. It can be used to prevent the form from submission if it does not contain an action. It is supported by <form> element.
Syntax:
<form ng-submit="expression"> Content ... </form>
Parameter:
Example 1: This example describes the basic use of the ng-submit Directive in AngularJS.
Output:
Example 2: This example describes the ng-submit Directive in AngularJS, where the greeting message will be displayed once the user is logged in.
Output: