Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need scope.$apply in version 1.1.0 #12

Open
Woodu opened this issue May 16, 2017 · 1 comment
Open

Need scope.$apply in version 1.1.0 #12

Woodu opened this issue May 16, 2017 · 1 comment

Comments

@Woodu
Copy link

Woodu commented May 16, 2017

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.

@craftpip
Copy link
Owner

Thanks @Woodu can you please submit a PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants