jameskleeh / angular-confirm

Confirmation modal dialog for AngularJS
Apache License 2.0
150 stars 75 forks source link

Add Support to Act Like JS Confirm() #43

Closed snowyaaron1 closed 8 years ago

snowyaaron1 commented 8 years ago

This should have similar functionality to confirm() in JS

A Boolean, indicating whether "OK" or "Cancel" was clicked in the dialog box: true - the user clicked "OK" false - the user clicked "Cancel" (or the "x" (close) button in the top right corner that is available in all major browsers, except Firefox)

Example:

if (document.getElementById("back-button").disabled || $confirm({title:'',text: "The 'Back' button will be disabled if a field " + "name is changed. Press 'OK' to confirm.", ok: 'OK', cancel: 'Cancel'}) == true)

I have read your documentation and do not see an example like this.

jameskleeh commented 8 years ago

Unfortunately that would have to be a blocking operation in order for it to function like you describe. I'm certain that would be an undesirable change for the vast majority of users.