News for hackers. Stuff that matters.
Re:Polymer, a Web Components library built by Google by v13inc on Thursday May 16, 2013 @08:01PM (#5722007)
I just tweaked the GP's example to used <input value="{{name}} ({{age}})"></input>, which rendered as expected. The field wasn't bound to the age or name properties though, which makes sense.

In practice, this almost seems like "sugar" that automatically binds an input to a value if it's value contains ONLY the property.

To test out the binding sugar, I tried using this input: <input value=" {{name}}"></input> (note the space before {{name}}), which did not bind {{name}} to the input.

I'm still of the opinion that the binding should be more explicit.

Edit: typo fix

Re:Polymer, a Web Components library built by Google by scottjmiles on Thursday May 16, 2013 @11:30PM (#5722548)
This is good feedback. We wanted to start with an easy mode, so people could on ramp quickly. In this case, you just use {{ }} for various kinds of binding and Polymer will (try to) do the right thing. I suspect we will need an alternative syntax for folks like yourself that want an explicit, engineering mode.
Re:Polymer, a Web Components library built by Google by v13inc on Monday May 20, 2013 @11:32PM (#5741755)
If anyone is interested, I hacked together a proof-of-concept framework with a different take on the {{ }} style binding: https://news.ycombinator.com/item?id=5741708