I need to get data of a mat-select specifically the text and its value. This is how I implemented the mat-select so far..
<mat-select
placeholder="Transaction Type"
(selectionChange)="selected($event)"
formControlName="TransactionTypeID"
>
<mat-option *ngFor="let t of transactionTypes" [value]="t.TransactionTypeID">
{{ t.TransactionType }}
</mat-option>
</mat-select>
This is how I get the value in the .ts file: this.formDetail.get('TransactionTypeID').value,
This is my attempt to get the text or 't.TransactionType':
selected(event: MatSelectChange) {
console.log(event);
}
Can you please show me how to do this? Thank you.