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

modal.shown and modal.hidden $emit doesn't pass modal anymore #1065

Closed
jprichardson opened this issue Apr 6, 2014 · 4 comments
Closed

modal.shown and modal.hidden $emit doesn't pass modal anymore #1065

jprichardson opened this issue Apr 6, 2014 · 4 comments

Comments

@jprichardson
Copy link

This commit b593cf1#diff-252c9b347a8b59e14b893043061f4309R45 broke my code.

This was changed:

this.scope.$parent.$broadcast('modal.hidden', this);

to

this.scope.$parent.$broadcast('modal.hidden');

and

self.scope.$parent.$broadcast('modal.removed', self);

to

self.scope.$parent.$broadcast('modal.removed');

was this intentional? My goal is to be able to call code when the modal is visible from within the modal controller. My old way was a bit hacky, as I was listening for modal.shown using $on.

@jprichardson
Copy link
Author

Line 44 & 45 (new commit) shows the modal.shown change.

@ajoslin
Copy link
Contributor

ajoslin commented Apr 7, 2014

Hm, I guess I removed it because it was undocumented and I didn't find it as a necessity. But you're right, it's really good to have. Adding it back.

@ajoslin ajoslin closed this as completed in a19e3b6 Apr 7, 2014
@jprichardson
Copy link
Author

Awesome, thank you! Does it make sense to pass the modal on modal.removed?

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants