Using angular 11 and trying to get the value of the option element when I select an option. I've looked at probably 20 docs / so answers that say to do this:
html:
<select class="ui-select ui-select--large" (change)="fn($event)">
<option [value]="null" selected disabled>Select somthing</option>
<ng-container *ngIf="values">
<option *ngFor="let value of values [value]="value.id">{{ value.name }}</option>
</ng-container>
</select>
ts:
fn(event) {
console.log(event.target);
}
When I select an option the select element itself gets logged, not the option element that I selected. Why?