-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Polymer 1.0 rewrites links to be relative to source document rather than page. #2448
Comments
Bump. This is a big gotcha that's bitten me a few times. |
Absolute paths should not be rewritten -- this should be fixed. |
It definitely should not behave different when using computed binding like this:
(this way it's resolved against the page) |
dfreedm
added a commit
that referenced
this issue
Jul 29, 2016
jorgecasar
pushed a commit
to jorgecasar/polymer
that referenced
this issue
Aug 14, 2016
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In polymer 1.0, my elements that have links in the template dom are re-written to be relative to where the element is loaded rather than relative to the current browser location.
That is, if (in my element) I have:
and the page is at
http://widgets.com/
but the static content is served fromhttp://cdn.com/path/to/content/
, the link will point tohttp://cdn.com/about
instead ofhttp://widgets.com/about
.This appears to be occurring due to the urlResolver code:
which is getting applied to my element.
A workaround at the moment is to inject the url via data-binding to a computed function, e.g.:
with
in my element... but that's just silly.
The text was updated successfully, but these errors were encountered: