I'm having trouble setting the dropdown values using a foreach method in my code. It seems to be loading 5 times for each dropdown, which is not what I want. I only want to display the specific value for each dropdown option (e.g. only the "Car" value for the Car dropdown). How can I achieve this?
main.component.html:
<div
class="custom-select"
style="width:400px;"
*ngFor="let v of vehicle; index as i"
>
<p>{{ v }}</p>
<app-vehicle [data]="travals"></app-vehicle>
</div>
Demo: https://stackblitz.com/edit/angular-ivy-yxfoyl?file=src%2Fapp%2Fmain%2Fmain.component.html