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.
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.