Skip to content

Conversation

@xtang
Copy link

@xtang xtang commented Jul 26, 2014

hi,

I found container would be invalid when route changed, so I just select it every time when config.container is set by user. Does that make sense?

thanks.

modal.js Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're changing this logic, you should remove the other container = angular.element(config.container || document.body),

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, forgot that:(

@btford
Copy link
Owner

btford commented Jul 29, 2014

I don't really understand the problem. This might be a good fix, but this needs an accompanying test case showing where the existing logic falls short.

@xtang
Copy link
Author

xtang commented Jul 30, 2014

@btford Sure, I will add a test case.

@xtang
Copy link
Author

xtang commented Jul 30, 2014

I think it's not the issue of btfModal, but my usage.

I followed the example in README, because the MyModal is singleton, the container seems to be binding to a block in the first directive(template) who injects the MyModal.

When I jump into the others(also injects the MyModal), MyModal's container is still in first directive element. Hope I make it clear...

thanks

@btford
Copy link
Owner

btford commented Mar 4, 2015

Makes sense. I'm not particularly opposed to this change, but it seems like it might be better to just create a new modal instance for each controller.

@btford btford closed this Mar 4, 2015
@btford btford reopened this Mar 4, 2015
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

Successfully merging this pull request may close these issues.

2 participants