-
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
BaseURL other than / makes troubles #19
Comments
We use the rootURL property on the var Router = Ember.Router.extend({
rootURL: '/a'
}); Perhaps one of these mechanisms is a legacy way of setting the root URL? |
@GavinJoyce at first of all, thanks for your effort and ember-href-to. I'm not sure if we are using a legacy way of setting the root URL. I just started a new ember-cli project yesterday (with ember cli version |
Perhaps you could create a simple ember twiddle which demonstrates the problem? This would allow me to make a suggestion or a fix much faster |
@GavinJoyce okay, I'll try to figure it out how I can setup an Ember CLI project with an environment.js as an |
I tried to reproduce the |
I can confirm that I have the same issue using baseURL. I don't think baseURL is legacy as it is still the "official" way of ember-cli guides rootURL doesn't seem to be part of the "Routing Introduction" section of Ember Guides since v2.0.0 though but might be somewhere else. |
I also have to add that this does only happen with sub-routes:
And finally {{link-to}} doesn't have the same problem (if it can be of any help) I don't think it's possible to create an ember-cli twiddle for this but I'll try to find some time this weekend to create a small app which reproduces the problem |
Thanks, a sample application which demonstrates the problem will allow me to address the issue much more rapidly |
@GavinJoyce: It was quite hard to reproduce the bug on a fresh ember-cli project. The problem arises when you add a fallback route to the router. What we have in our project is: I created a github repo because I don't know how to outline this problem in an ember-fiddle. Hope this is ok? Basically you will see a simple ember-cli app which has 3 pages, index/home, about and contact. Then there is the navigation once with embers Hope this helps finding the problem. I'm not quite sure if it is a bug with |
@tschoartschi thanks for the repo. I can see that the rendered URLs are correct: It looks like |
I cross-checked it and I think you are right. The |
|
|
@GavinJoyce we host our ember app in a subdirectory called /app, when I use Ember-Href-To the links does not work, because Ember-Href-To resolves the links to /app/app. We are using Ember-CLI and our environment.js looks as follows:
I solved it by making my own helper based on Ember-Href-To. The helper looks as follows:
It works but if I hover the links built with hrefToX the links dont contain the /app/. This does not happen with link-to. Is my solution the right way to go or is there a better way to do it?
Thanks a lot
The text was updated successfully, but these errors were encountered: