HTML:
<mat-form-field>
<mat-select placeholder="Section Types"(selectionChange)="selectSectionType($event)" disableRipple>
<mat-option *ngFor="let type of sectionTypes" [value]="type.value">
{{type.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
TS:
sectionTypes: DropDown[] = [
{value: '0', viewValue: 'Horizontal'},
{value: '1', viewValue: 'Vertical'}
];
selectSectionType(event: any){
console.log("section type: " + event.target.value);
}
Когда я выбираю значение из выпадающего списка, выбирается метод selectSectionType, но событие event.target.value возвращает неопределенное,Интересно, почему.
Спасибо за любую помощь