Most answers here suggest using something like:
<form [formGroup]="form" (ngSubmit)="yourMethod()" (keyup.enter)="yourMethod()">
</form>
This approach does not result in the form object being marked as submitted
. You might not care for this, but if you're using something like @ngspot/ngx-errors (shameless self-promotion) for displaying validation errors, you gonna want to fix that. Here's how:
<form [formGroup]="form" (ngSubmit)="yourMethod()" (keyup.enter)="submitBtn.click()">
<button #submitBtn>Submit</button>
</form>