{{myTxt}}
var app = angular.module("myApp", []); app.controller("myCtrl", function($scope) { $scope.myTxt = "You have not clicked submit!"; $scope.myFunc = function () { $scope.myTxt = "You clicked submit!"; } }); [Try it Β»](#) * * * ## Definition and Usage The **ng-submit** directive is used to execute a specified function after a form is submitted. * * * ## Syntax The element supports this attribute. * * * ## Parameter Values | Value | Description | | --- | --- | | _expression_ | A function to be called when the form is submitted, or an expression that evaluates to a function call. | * * AngularJS Reference](#)Ng Ng Submit
# AngularJS `ng-submit` Directive
[ AngularJS Reference](#)
* * *
## AngularJS Example
Execute a function after form submission:
YouTip