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

Since 0.3.0 binding array elements doesen't work #526

Closed
arodic opened this issue Jun 7, 2014 · 3 comments
Closed

Since 0.3.0 binding array elements doesen't work #526

arodic opened this issue Jun 7, 2014 · 3 comments

Comments

@arodic
Copy link

arodic commented Jun 7, 2014

With 0.2.4 you used to be able to bind {{value[0]}} or this.$.element.bindProperty('value', new PathObserver(this.value, 0)); Since 0.3.0 that does not appear to work.

@arthurevans
Copy link

Can you give some more detail? Binding to array elements seems work correctly in 0.3.1:

http://jsbin.com/wubev/2/edit

It correctly renders the value at array[0], and observes the change when you click on the element.
If you're still seeing this, please provide a code sample that reproduces the bug.

@arodic
Copy link
Author

arodic commented Jun 8, 2014

True, it seems to work correctly with mustache binding. However, bindProperty seems to fail. Here is a jsbin: http://jsbin.com/vuragono/5/edit

Expected result is Hello, Bob! as with 0.2.4.

@rafaelw
Copy link
Contributor

rafaelw commented Jun 9, 2014

Ah, yes. Sorry, this probably needs to be doc'd. The path '0' is now a syntax error. The correct syntax is '[0]'. The idea here is that paths are as if they followed a JS identifier and support member expressions with constants and property expressions.

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

3 participants