I need help creating a confirmation dialog box for user action verification. Here's the situation: I have a table with multiple events, and users can choose to delete an event.
This is how the table is structured:
<tbody>
<tr ng-repeat="event in EventsCtrl.events>
<td>
<a ng-click="event.updateStatusDone(event.eventid)" href="#">
<i class="delete-icon"></i>
</a>
</td>
<td>{{event.timestamp}}</td>
<td>{{event.date}}</td>
...
The relevant code in the controller is as follows:
app.controller('EventController', ['$http', function($http){
this.updateStatusDone = function(eventid){
$http.delete(serverUrl + "/manage/event/" + eventid);
}
}
Now, I want to implement a confirmation box (perhaps using a modal) to request user confirmation before proceeding. The eventid
needs to be passed through.
I've done some research on modals, but most examples only show alerts without passing necessary data like eventid
.
If anyone has a working example, suggestions, or references to share, I would greatly appreciate it!
Thank you in advance!