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

'Implicit' from-elsewhere #9

Open
ghost opened this issue Nov 24, 2016 · 2 comments
Open

'Implicit' from-elsewhere #9

ghost opened this issue Nov 24, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 24, 2016

I'd like to use this neat addon in an addon. But what I found is that the consuming app needs to manually add a {{from-elsewhere}} into application.hbs. Addons using ember-wormhole often are able to use the content-for hook hook to drop a div into the body. Would you know a way for ember-elsewhere to achieve roughly that same feature?

@ef4
Copy link
Owner

ef4 commented Nov 24, 2016

I have gone down the path you describe (with early versions of liquid-modal) and it led to fragility and breakage. Overall I think it's positive that users have complete control over their own DOM via their templates. Adding one line of code to application.hbs doesn't seem like a bad cost to avoid creating a new kind of magic for making DOM appear from nowhere.

But for people who really want this capability, I think it could be a separate complementary add-on. One that specifically exists for getting a component into application.hbs magically. That would compose nicely with from-elsewhere.

@erichaus
Copy link

interesting, in our case we have client websites that inject our ember app with certain possible "bindings" that would be on the customer page with our app... e.g. <div class="my-binding">. I'm wondering if I could automatically create {{from-elsewhere}} inside each binding with same name or make it into a from-elsewhere itself? basically dynamically rendered from-elsewhere

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