i'm trying to get a confirmation modal dialogue to work. I Have a button with an ng-click directive that calls confirmDelete()
html
<input type="button" ng-click="confirmDelete(idToDelete)" class="btn">Delete</input>
ControllerLogic:
$scope.confirmDelete = function (idToDelete) {
// create a modal dialog with $modal.open from Bootstrap UI
// if answer in modal dialgue was "yes" call
// deleteItem(idToDelete);
// else close modal and do nothing
}
$scope.deleteItem = function (idToDelete) {
//execute deletion
}
I'm not able to achieve what i tried to describe in the pseudo-code above. Maybe someone can give me a hint.
That´s the way I coded It
components/modal.jade
components/modal.service.js
components/modal.css
Controller.js
HTML
Hope it will help to you.