I have a dropdown:
<ul class="dropdown-menu">
<li><a href="#" (click)="showSelectedImage(1)">Option 1</a></li>
<li><a href="#" (click)="showSelectedImage(2)">Option 2</a></li>
<li><a href="#" (click)="showSelectedImage(3)">Option 3</a></li>
</ul>
and I have 3 images:
<img class="hidden" src="image1.png" alt />
<img class="hidden" src="image2.png" alt />
<img class="hidden" src="image3.png" alt />
In app.component.ts I have this method:
showSelectedImage(image) {
// ...
}
What I need to do is when an image is selected from the dropdown menu, I need that image to be shown and the others to be hidden.