【发布时间】:2014-03-10 21:22:34
【问题描述】:
【问题讨论】:
【问题讨论】:
一种方法是通过*Changed 观察者并设置.innerHTML 节点:
<div id="div"></div>
labelChanged: function() {
this.$.div.innerHTML = this.label;
}
然后,对于 <template repeat> 的情况,将内容包装在遵循类似模式的自定义元素中:https://stackoverflow.com/a/22208332。
【讨论】:
<element inner-h-t-m-l="{{prop}}"></element>
适用于 Polymer 2。来源:https://github.com/Polymer/TemplateBinding/issues/57
【讨论】: