-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix invalid container #23
base: master
Are you sure you want to change the base?
Conversation
@@ -19,6 +19,7 @@ factory('btfModal', function ($animate, $compile, $rootScope, $controller, $q, $ | |||
controllerAs = config.controllerAs, | |||
container = angular.element(config.container || document.body), | |||
element = null, | |||
container = angular.element(document.body), |
There was a problem hiding this comment.
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),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot that:(
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. |
@btford Sure, I will add a test case. |
I think it's not the issue of I followed the example in README, because the When I jump into the others(also injects the thanks |
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. |
hi,
I found
container
would be invalid when route changed, so I just select it every time whenconfig.container
is set by user. Does that make sense?thanks.