Hi there! I would just like to ask if someone has a solution: “How do I delete a specific ion-item from my script”.
Actually I’m on ionic 3 with typescript as script language.
The real purpose is that I have a page that displays a list of appointments, then when there’s click on one of the items, another page opens displaying the details of it with a cancel button that returns the view to the appointment list page while deleting the appointment item that corresponds to the one that was canceled.
You have several options. Either move the array with appointments in a service, inject that into the view where you have your list and into detail page. From there it’s easy just using .splice(indexOfAppointment, -1). Or you could make use of Events, in your list page subscribe to an event which would get index of deleted appointment and delete it after cancel button published the event. Another thing you could do is make the detail page into a modal and pass it as dismiss data.