https://stackblitz.com/edit/angular-ivy-s2ujmr?file=src/app/pages/home/home.component.html
I am currently working on getting the dropdown menu to function properly for filtering the flags displayed below it.
My initial thought was to replicate the search bar filtering method that I used, like so:
home.component.ts
CODE HERE
and then in the HTML file, add a "(change)" event listener as shown below:
home.component.html
<div class="drop-down">
<select (change)="updateDisplayRegions($event.target.value)">
<option *ngFor="let region of regionOptions" value="{{region}}">{{region}}</option>
</select>
</div>
However, I encountered errors when trying this approach, specifically related to passing the dropdown selection value into the function:
Error message 1
Error message 2
What is the correct way to pass the value of the selected option from the dropdown into the change function for filtering purpose? How should I handle this in Angular instead of using "event.target.value"? Am I going about this task the wrong way?