dart - What is the difference between @observable and @published -
until polymer 0.10.1 @published
annotation created attribute on polymer element declared.
changed polymer 0.11.0. since @publishedproperty(reflect: true)
needed make fields value available attribute.
it seems since update @published
has same effect @observable
. missing something?
the @published
attribute still allows use value attribute in html declaratively. can still do:
<my-element myprop="{{hello}}"></my-element>
the change accessing values procedurally via attributes
property, must include @publishedproperty(reflect: true)
. (this not seem case if you're interactive customtag class directly.
needs @publishedproperty(reflect: true)
:
var x = queryselector('x-foo'); x.bar = "hi"; // ... print(x.attributes["bar"]);
this needs @publishedproperty(reflect: true)
:
/* css */ x-foo[bar="hi"] { background-color: blue; }
this not:
xfoo x = queryselector('x-foo'); x.bar = "hi"; ... print(x.bar);
this inferred discussion group new polymer release 0.12.0
Comments
Post a Comment