I'd like to get mat-option value from mat-select inside mat-form-field using form submit, how to return mat-option value?
My HTML File :
<form (submit)="updateProfileCompany($event)"> <mat-form-field> <mat-select name="company" placeholder="Select Your Company" #companyValue> <mat-option *ngFor="let company of companies" [value]="company.id"> {{company.perusahaan}} </mat-option> </mat-select> </mat-form-field> <div align="right"> <button mat-raised-button >Add Company</button> </div> </form>
My method inside typescript file :
updateProfileCompany(e){ console.log(e); }