How to make an item of a list disappear when i click on a button

          <ion-thumbnail item-start>
            <img src="../../assets/imgs/etd1.jpg">
          <button ion-button color="secondary">Present</button>
          <button ion-button color="danger">Absent</button>

Hi dear All , i got this code over here wich is a list of students with present and absent buttons , i wonna make every item disappear when i click on the present button
how do do that any ideas please
thank u


that seems a case for structural directive ngFor. see here

Maybe you should rethink your design. If you click on button and remove the ion-item, then you remove also the buttons inside ion-item. What is, if you tapped the wrong student? Maybe sortablejs or ng-dragula is an alternative ui.

Your <img src = points maybe to src folder in your project. This folder is with ionic serve reachable, but not on device or production. Set all paths from view of index.html. In this case should src = “assets/imgs/etd1.jpg”

Best regards, Erina Nakiri

1 Like

thanks for your reply , i appreciate it ^^ , i will try to do so