Can you help me with this code snippet:
<select #categorySelect (change)="goToCategory.emit(categorySelect.value)" style="...">
<option selected hidden>All</option>
<option
[ngValue]="category"
*ngFor="let category of categories">
{{category.groupName}}
</option>
</select>
@Output() goToCategory = new EventEmitter<Category>();
I am facing an issue where I am getting the string 'object Object' instead of the actual object category. Is there a way to modify the code so that I can get the object element for the function in '(change)'?