-
Notifications
You must be signed in to change notification settings - Fork 397
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
Dynamic data-binding with an absolute path do not work #319
Comments
This is a tricky one. Basically, <input value='{{ foo.toUpperCase() }}'> ...then we know that if
The problem with 1 is that reverse-engineering an arbitrary expression is just really difficult. The problem with 2 is that some expressions are not 'reversible'. If we could solve 1, then we'd know whether or not 2 applied to a given expression (like It would be neat to have a solution to this problem - I think it's certainly possible to identify expressions like <label>Circle area: <input value='{{ Math.PI * radius * radius }}'></label> that probably aren't even worth attempting. Either way we're left with an open question - what should happen when an input's value is bound to an expression? Maybe a console warning? Throwing an error seems like overkill since in a few edge cases one-way binding to an expression might actually be the desired result. Would be interested in any ideas. In the meantime, none of this solves your problem. I think the most likely solution is to fire events and listen for them: <input on-input='changeName:{{i}}'> Hope this helps. |
Would it be possible to treat When it is a |
Futher looking.. When I look on how the template gets parsed with
and with
Would it be possible to convert the parser to output this instead?
when that is possible we can go to next step and referrer to another items.
|
The problem with that is that there's no way to tell, by looking at What I'm hoping is that it's possible, once an expression like I'm going to mark this as a 0.3.9 milestone, since it's a bit of an unknown quantity and I'm planning to get 0.3.8 out the door ASAP |
This is solved as of c040824, at least for the original case where we have expressions like It's a bit of a hack, but it works. I'll close this issue for now, as being able to reverse engineer more complex expressions is probably a bit ambitious. One day maybe. |
In this example http://jsfiddle.net/7KfEe/
When writing in the input field, the text below should have changed, but it doesnt.
I could change
{{items[i].name}}
to{{.name}}
then it will work. but in my case it need to have an absolute path because I have two different data set with the same structure, where the absolute path actually points outside the loop.The text was updated successfully, but these errors were encountered: