How does the ng-submit directive work?

ng-submit binds a form submission to an AngularJS expression or function in the controller.

<form ng-submit="submitForm()">
  <!-- Form fields -->
</form>