AngularJS Forms ngSubmit() Method Last Updated : 14 Jun, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we are going to see what is ngSubmit method in Angular 10 and how to use it. The ngSubmit() method is called when the 'submit' event is triggered on the ngForm. Syntax: <form (ngSubmit)='method($event)'></form> Parameters: $event: the "submit" event object Approach: Create an Angular app that to be used.In app.component.ts, make an array that takes the value from the form.In app.component.html, make a form and send the value using (ngSubmit) method.Serve the angular app using ng serve to see the output. Example: app.component.ts import { Component, Inject } from '@angular/core'; import { FormGroup, FormControl, FormArray, NgForm } from '@angular/forms' @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { submit(form: NgForm) { console.log(form.value); } } app.component.html <form #form="ngForm" (ngSubmit)="submit(form)" novalidate> <input name="first" ngModel required #first="ngModel"> <input name="last" ngModel> <button>Submit</button> </form> Output: Reference: https://angular.io/api/forms/NgForm#onsubmit Comment More infoAdvertise with us Next Article AngularJS Forms ngSubmit() Method T taran910 Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Function Angular10 AngularJS-API +1 More Similar Reads AngularJS ng-submit Directive 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>Parame 2 min read HTML | DOM Form submit() Method The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters. Syntax: formObject.submit()Example: index.html<!DOCTYPE html> <html> <head> <title> HTML DOM Form submit() Method </ 1 min read AngularJS | Forms Forms are collection of controls that is input field, buttons, checkbox and these can be validated real time. As soon as a user of the form completes writing a field and moves to the next one it gets validated and suggests the user where he might have went wrong. So a form can be consisting of the m 3 min read AngularJS Form Validation AngularJS performs form validation on the client side. AngularJS monitors the state of the form and input fields (input, text-area, select), and notify the user about the current state. AngularJS also holds information about whether the input fields have been touched, modified, or not. Form input fi 3 min read AngularJS form.FormController AngularJS is a JavaScript-based framework. It can be used by adding it to an HTML page using a <script> tag. AngularJS helps in extending the HTML attributes with the help of directives and binding of data to the HTML with expressions. In this article, we'll learn about the AngularJS form.Form 3 min read Like