jameskleeh / angular-confirm

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

Ensure confirm modal is triggered even when the `confirmIf` attribute is not present (AngularJS 1.4.x only) #9

Closed almeidap closed 9 years ago

almeidap commented 9 years ago

… and refactor to avoid using $watch().

It seems that, since AngularJS 1.4, the confirmIf key is always present in the attrs object, even when it is not declared in the HTML markup: https://github.com/Schlogen/angular-confirm/blob/1.0.4/angular-confirm.js#L82

jameskleeh commented 9 years ago

Edit: Nevermind. Give me some time to review this

johannesspohr commented 9 years ago

I'm using angular 1.2 and experiencing the same issue (confirmIf is present but undefined), so i would really appreciate this solution.

jameskleeh commented 9 years ago

There were a lot of conflicts so I merged this under 418c955. Thank you for your contribution!

almeidap commented 9 years ago

You are welcome! ;)