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

Expose configuration to opt-out for specific route names. #41

Open
rwjblue opened this issue Apr 25, 2016 · 1 comment
Open

Expose configuration to opt-out for specific route names. #41

rwjblue opened this issue Apr 25, 2016 · 1 comment

Comments

@rwjblue
Copy link

rwjblue commented Apr 25, 2016

It is a fairly common practice to add globbing catch-all style routes to your Router.map to handle invalid links and whatnot. Since these catch-all routes will always match, ember-href-to's link handler will happily transition into the 404 route.

In deployments where a given root is fully owned by the Ember app, this is a totally fine assumption to make. However, in scenarios where things outside of your Ember app also live on the same domain (i.e. you are transitioning from server render pages to Ember app pages) you actually want to ignore the 404 route when deciding if a given link click is handleable.

Would you be open to adding support for a blacklist (an array of route names) to opt-out of the internal transition behavior?

PS: I love this addon, thank you for working on it!

@GavinJoyce
Copy link
Contributor

@rwjblue is it just catchall routes that you want to ignore? If so, it would be nice if we could detect those and ignore (possibly by default, possibly by a simple config switch). There was some previous discussion about it here, at the time is seemed that it wasn't possible to detect catchall routes.

If that option proves unfruitful, I think a blacklist of route names is fine, albeit a less elegant solution.

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