Home » AngularJS ng-submit Directive

AngularJS ng-submit Directive

by Online Tutorials Library

AngularJS ng-submit Directive

The AngularJS ng-submit directive specifies a function to be executed when the form is submitted. If you don’t use the ng-submit directive in the form then it will not be submitted.

It is supported by <form> element.

Syntax:

Parameter explanation:

expression: It specifies a function that is called when the form is being submitted, or an expression to be evaluated, which should return a function call.

Let’s take an example to demonstrate the usage of ng-submit directive.

See this example:

Test it Now


Example 2:

Test it Now

You may also like