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

[FEATURE ember-eager-url-update] link-to should generate the url if it eagerly updates it, not use the href because it includes rootURL. Fixes #1244 #4312

Merged
merged 1 commit into from
Feb 6, 2014

Conversation

jayphelps
Copy link
Contributor

link-to used to let the transition update the URL, but #4122 made link-to request a URL update with the router, providing its own URL based off the href cp.

Unfortunately, the href includes the rootURL, if one is used, which the router, nor the Location classes are expecting it to already have, so they prepend it again.

This PR makes link-to always generate the URL, just like the transition does.

Fixes #1244

@jayphelps
Copy link
Contributor Author

@pixelhandler

@rwjblue
Copy link
Member

rwjblue commented Feb 6, 2014

👍

@machty - When you have a moment, could you +1/-1 since this is related to ember-eager-url-update?

@jayphelps
Copy link
Contributor Author

@rjackson The commit should actually be [FEATURE ember-eager-url-update] instead of BUGFIX since this is canary online still, right?

@rwjblue
Copy link
Member

rwjblue commented Feb 6, 2014

@jayphelps - Yes, good call. This has not made it into a beta, so FEATURE ember-eager-url-update is the right way to go.

@jayphelps
Copy link
Contributor Author

@rjackson okay, I'm mobile right now so will amend later tonight.

@jayphelps
Copy link
Contributor Author

@rjackson @machty amended and now includes a passing test. lmk

…t eagerly updates it, not use href because it includes rootURL. Fixes emberjs#1244
@pixelhandler
Copy link
Contributor

@jayphelps @rjackson @machty - I updated the example (busted) app with the fix for the link-to url here: http://pixelhandler.github.io/ember-data-extensions/blog-fix/ looks like Jay's fix solved the issue. Busted rootURL example app: http://pixelhandler.github.io/ember-data-extensions/blog/

machty added a commit that referenced this pull request Feb 6, 2014
[FEATURE ember-eager-url-update] link-to should generate the url if it eagerly updates it, not use the href because it includes rootURL. Fixes #1244
@machty machty merged commit 1133d7b into emberjs:master Feb 6, 2014
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

Successfully merging this pull request may close these issues.

Ember.Router: rootURL gets appended multiple times
4 participants