I need to create polymer custom element with binding attribute.
<foo-bar baz="{{qux}}"></foo-bar>
It's OK. But it must be created dynamically (tagName passed as an attribute). I try this
Polymer({
ready: function() {
var element = document.createElement(this.tagName);
element.setAttribute('baz', '{{qux}}');
this.$.placeholder.appendChild(element);
}
});
But it does not work. How can I do that?