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

Attribute value not correctly propagated to elements #374

Closed
wereHamster opened this issue Dec 15, 2013 · 2 comments
Closed

Attribute value not correctly propagated to elements #374

wereHamster opened this issue Dec 15, 2013 · 2 comments

Comments

@wereHamster
Copy link

I have the following code:

<rmx-link href="/foo/{{ myid }}"></rmx-link>

However, inside the rmx-link element the href attribute is equal to the value of myid without the /foo/ prefix. Here is an jsfiddle: http://jsfiddle.net/wereHamster/j7a5d/2/. I would expect to see '/foo/1234' in the page but I only see '1234'.

This used to work in earlier versions. The jsfiddle uses the latest versions from the polymer/platform and polymer/polymer repositories.

@wereHamster
Copy link
Author

It seems as if ObserverTransform#getValue is buggy. It should not return observable_.getValue() but instead this.value_. With this change, the sample code in jsfiddle works as expected.

The ObserverTransform getValueFn_ function is the token combinator which converts the href tokens ("/foo/",Path) into the proper value. The observable_ of the transformer is the PathObserver which observes myid. Calling observable_.getValue() returns the myid string. That is the wrong implementation of the ObserverTransform getValue function.

@rafaelw
Copy link
Contributor

rafaelw commented Dec 16, 2013

Fixed: googlearchive/observe-js@d5e8dc3

@rafaelw rafaelw closed this as completed Dec 16, 2013
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