Angular - Submit a form programmatically.
I have a form group on the HTML and I want the component to submit the form\'s action with an email field in a post method. Ins
I have found a good solution on github
it will setup submitted as true
Out approach now is:
HTML:
ts:
@ViewChild('myForm') ngForm: NgForm; ... public onSubmit() { this.ngForm.onSubmit(undefined); // it will setup submitted as true