Polymer 1.0: variable binding data to the <iron-meta> element (value attribute)

In Polymer 1.0, I try to bind data to the string variable {{str}} to the <iron-meta> element (tag in the parent element) as follows.

This fails:

 <iron-meta id="meta" key="info" value="{{str}}"></iron-meta> 

The above code is broken. But the following code works (without binding).

It works:

 <iron-meta id="meta" key="info" value="foo/bar"></iron-meta> 

The difference is that the variable version {{str}} fails and the constant version "foo/bar" works.

Does anyone know what is breaking the binding and how to fix it?

Edits in response to comments:

  • How does this happen? It fails. The values ​​I printed are simply not updated when I press the login and registration buttons.

  • Here is a link to the code in the Github repository. See Rows

+1
source share
1 answer

You need to use attribute binding, not property binding

 <input type="text" value$="{{str}}" /> 
+2
source

All Articles