jameskleeh / angular-confirm

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

option to don't display the confirm modal #58

Closed alainib closed 8 years ago

alainib commented 8 years ago

I look in the closed issues but don't found a help.

I made an interface with a list of button. on each button there is a confirm with yes/no. http://awesomescreenshot.com/0465v52t3e

there is a lot of button so if the user needs to click 10 of them, the confirm message will be boring after 2/3 times. Is there a way to display inside the confirm modal a button to "ok i understand, stop showing confirm" so on other button click confirm will not show.

It is on same idea that how modern web browser handle popup .

thanks

jameskleeh commented 8 years ago

@alainib There is a confirmIf option you can use. Set the option to a variable and assign it to false if you no longer want to prompt the user. You would have to do it via the $confirm service. You can use a custom template which has the button ng-click=ok(true) then:

$confirm(...).then(function(wantToIgnore) { showConfirm = !wantToIgnore; });