Я хочу получить значение при изменении выбранной опции в теге выбора в моем angular компоненте:
<select name="types" class="custom-select form-control rounded" (change)="changeType($event.target.value)">
<option selected value="allTypes">Tous</option>
<option *ngFor="let type of types; let i = index" [value]="types.id">
{{types[i].name}
</option>
</select>
changeType(type) {
this.chosenType = type
console.log('changed type', type)
this.getData()
}
при регистрации выбранного типа я получил неопределенное значение!