How can I submit a reactive form programmatically or how to detect the button which is clicked? I have 2 buttons to submit the same form and for each button click, I want to take different actions apart from submitting.
<form (ngSubmit)="onSubmit($event)" [formGroup]="patientInfoForm">
.
.
.
<button id="add" type="submit" >Add Patient & Continue</button>
<button id="addngo" type="submit" >Add Patient</button>
</form>