imperatively i am not able to get a mustache-binding to work in a polymer.dart component:
...
@observable String data = "testData";
...
ready() {
Element container = this.shadowRoot.querySelector("#container");
DocumentFragment newFragement = this.createFragment("<sample-element myAttribute='{{data}}'></sample-element>");
container.nodes.add(newFragement);
}
the mustache binding is not interpreted, a workaround i found is this one, but i dont know if this is the preferred way to do it and the downside is that i cannot use the mustache-binding imperatively than:
Element newElement = new Element.tag("sample-element");
nodeBind(newElement).bind("myAttribute", new PathObserver(this, "data"));
container.nodes.add(newElement);
Any thoughts welcome! :-)