I am trying to setup a confirmation dialog on an ng-click using a custom angularjs directive:
ng-click
app.directive(\'ngConfirmClick\', [ function()
Its so simple using core javascript + angular js:
$scope.delete = function(id) { if (confirm("Are you sure?")) { //do your process of delete using angular js. } }
If you click OK, then delete operation will take, otherwise not. * id is the parameter, record that you want to delete.