ember-href-to icon indicating copy to clipboard operation
ember-href-to copied to clipboard

Add support for routable engines

Open aaxelb opened this issue 7 years ago • 10 comments

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.

aaxelb avatar May 18 '18 16:05 aaxelb

I was not sure how to write tests that pretend to be in an engine, suggestions are welcome.

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?

GavinJoyce avatar May 20 '18 19:05 GavinJoyce

@aaxelb - You need to add export { default } from 'ember-href-to/helpers/href-to-external' to app/helpers/href-to-external.js.

Apart from that, this seems to work!

willviles avatar Jun 12 '18 11:06 willviles

Bump.

jamescdavis avatar Feb 06 '19 03:02 jamescdavis

@GavinJoyce @jamescdavis any updates on this?

GCheung55 avatar Jul 16 '20 00:07 GCheung55

Needs rebased to resolve conflicts. @aaxelb?

jamescdavis avatar Jul 16 '20 01:07 jamescdavis

rebas'd to resolve conflicts!

tho now the build is failing for node version reasons:

error [email protected]: The engine "node" is incompatible with this module. Expected version "8.* || 10.* || >= 12.*". Got "6.17.1"

aaxelb avatar Jul 16 '20 14:07 aaxelb

I've created PR #128 to just bump the Node.js version to 8 in .travis.yaml.

GCheung55 avatar Jul 20 '20 22:07 GCheung55

@aaxelb can you rebase? #128 was merged and should fix the Node.js version issue.

GCheung55 avatar Jul 21 '20 20:07 GCheung55

Any chance to merge this?

villander avatar Apr 06 '22 17:04 villander

Any update on this?

villander avatar May 05 '22 18:05 villander