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
Regarding "Angular - Submit a form programmatically" Here is code where a form submits itself. It works for me. Hope this helps.
Component HTML:
Component TypeScript:
@ViewChild('myForm') myForm : ElementRef; ngAfterViewInit() { this.myForm.nativeElement.submit(); }