Polymer 1.0 Node.bind () - Can I create a javascript binding instead of double curly braces?

Is there a way in Polymer 1.0 to configure binding using javascript like Node.bind() ?

[Ignore this: apparently, compression is not allowed on stackoverflow, so I have to write this useless sentence to post a question.]

0
source share
1 answer

Short answer: NO . Polymer 1.0 does not currently support mandatory data binding.

In 1.0, the data binding mechanism was completely rewritten, so previous 0.5-decimal methods, such as Node.bind('content', new PathObserver(obj, 'path.to.value')); or

 Polymer.import(["/elements/x-test.html"], function () { var el = document.createElement('x-test'); el.setAttribute('foo', '{{bar}}'); document.querySelector("#insertion_point").appendChild(el); }); 

or html-echo does not work.

Further information on this SO question: Obligation

More info on Github: https://github.com/Polymer/polymer/issues/1778

+2
source

All Articles