I am trying to find a way to get the id of an ion-item when the item is clicked or assign an id to the ion-item. I want to use the ID to display the correct picture on another page. Therefore, I won’t have to add an extra forty pages to my application.
list-buildings.page. html- this is where I need to assign or get the ID of the item
<ion-item> <img src = "/assets/img/gym.jpg" (click) = "goToFunBuildings()"> <ion-label color = "light" text-wrap text-right>Campus Gym!</ion-label> </ion-item>
funbuildings-page.page.ts- this is where I will be using the ID to display the correct image of the buildings