I have an HTML element in a component template, and need to trigger a function in my typescript file for the component when the selected option changes.
What I have tried so far:
Putting a (click) on the select. This did not work because it triggers when the select is clicked, before an option is selected.
Putting a (click) on the of the select element. For some reason, this did not work.
Here is what I am trying to do:
<select name="sort-by"
id="sort-by"
class="form-control"
(<someEvent>)="myFunc()">
<option value="lotNumber" >Lot Number </option>
<option value="firstName" >First Name </option>
<option value="lastName" >Last Name </option>
</select>