AngularJS Forms ngSubmit() Method
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.
- $event: the “submit” event object
- 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.