angular-confirm icon indicating copy to clipboard operation
angular-confirm copied to clipboard

Need scope.$apply in version 1.1.0

Open Woodu opened this issue 8 years ago • 1 comments

On close function: if (typeof this.onClose === 'function') this.onClose.apply(this, [this.scope]); and in the setTimeout function: if (typeof self.onDestroy == 'function') self.onDestroy.apply(self, [self.scope]);

These two functions will not emit anything to angular,so some angular function calls in onClose or onDestroy will not work properly like: onDestroy: function () { $location.path($scope.backurl); return true; }

so I changed those code to: if (typeof this.onClose === 'function') { this.onClose.apply(this, [this.scope]); self.scope.$parent.$apply(); }

to call angular apply the changes.

Woodu avatar May 16 '17 10:05 Woodu

Thanks @Woodu can you please submit a PR for it

craftpip avatar May 26 '17 13:05 craftpip