-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for routable engines #97
base: master
Are you sure you want to change the base?
Conversation
addon/helpers/href-to.js
Outdated
let owner = getOwner(context); | ||
|
||
// If used in an engine, namespace the route | ||
if(owner.mountPoint && targetRouteName !== 'application') { |
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.
perhaps create a well named variable in place of the comment? Something like linksToEngine
or linksToOtherEngine
perhaps?
I'm not familiar with engines so I don't have any good suggestions. Perhaps there are some tests in https://github.com/ember-engines/ember-engines that will serve as a guide? |
@aaxelb - You need to add Apart from that, this seems to work! |
Bump. |
@GavinJoyce @jamescdavis any updates on this? |
Needs rebased to resolve conflicts. @aaxelb? |
rebas'd to resolve conflicts! tho now the build is failing for node version reasons:
|
I've created PR #128 to just bump the Node.js version to 8 in |
2797dfd
to
b761532
Compare
Make {{href-to}} behave the same as {{link-to}} within an engine, automatically prefixing routes with the engine's namespace Add {{href-to-external}}, for routes external to the engine.
Any chance to merge this? |
Any update on this? |
Make
{{href-to}}
act like{{link-to}}
does within an engine, automatically prefixing routes with the engine's namespace.Add
{{href-to-external}}
helper, for linking to routes in an engine's host app. Acts like{{link-to-external}}
.This is a breaking change for anyone using
{{href-to}}
within an engine to link to routes in the host app, but that seems like an uncommon case.I was not sure how to write tests that pretend to be in an engine, suggestions are welcome.