firebase port is not straightforward. Firebase-element uses observers to 
detect changes for auto-save, and the observers are not used in 0.8. I 
would not start porting until I fully understand 0.8 data flow.

As for your question:

In 0.5, property binding used observers. Which was lovely, the model and 
the editor did not need to know anything about each other, everything just 
worked
In 0.8, property binding is implemented using custom events to broadcast 
poperty changes. Native tags like <input> do not broadcast these custom 
events. So, you'd have to do something like this:

<input on-change='handleChange'>

handleChange: function() {
    firebaseElement.setPath('data.name', this.$.input.value);
}

Which is a lot more verbose than it used to be. This area is still in a lot 
of flux.

Aleks


On Saturday, March 28, 2015 at 2:09:55 PM UTC-7, Michael Bleigh wrote:
>
> I started trying to port firebase-element to 0.8 
> <https://github.com/Polymer/firebase-element/pull/46> and got stuck on 
> simple two-way binding to input values. Is two-way binding only supported 
> via custom elements in 0.8? How would I do the equivalent of this in 0.5:
>
> <firebase-element location="https://example.firebaseio.com/demo"; data=
> "{{data}}"></firebase-element>
>
> <input value="{{data.name}}">
>
> Or, if that ought to work properly can you take a look at this example 
> <https://github.com/Polymer/firebase-element/blob/master/demos/firebase.html> 
> and tell me what's wrong with it?
>
> Cheers,
> Michael Bleigh
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/2c34bd26-f6b0-4fa7-a6d3-219694f4392b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to