-
Notifications
You must be signed in to change notification settings - Fork 153
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
Custom modals don't have destinationElementId injected #22
Comments
Interesting. We could get around this by creating a service to hold the default destinationElementId that is accessed via |
I found the same problem, and had to resort to the same solution https://github.com/sgasser/ember-cli-materialize/blob/master/app/initializers/add-modals-container.js#L12-L14 |
Same issue here, same workaround. |
OK, sounds like a plan. Open to a PR if someone wants to take this on. |
@lukemelia I'm doing this in a pop-over addon for our app, using a service which just has one property holding the If that looks good, I can do the same here and will open a pull request later today. |
@rlivsey Sounds good to me. Thanks. Please update the docs with your PR, as I think this approach is a little more confusing, but clearly necessary given the feedback. |
In our app we have some modals which are "full screen" and have some custom behaviour/settings (no overlay, different CSS etc…).
To accomplish this I made a new component which extends from
ModalDialogComponent
add adds in the custom behaviour so in my templates I can now do:This breaks because the wormhole's destination element ID is only injected into the 'modal-dialog' component.
This is easily worked around by adding another injection:
However, ideally we wouldn't have to do this.
The text was updated successfully, but these errors were encountered: