0
私は、データバインディングのいくつかの注釈を持つテンプレートを効果的な子として受け取るカスタム要素を持っています(たとえば、my-view
としましょう)。ポリマー1では、分散されたテンプレートを別の要素でラップする方法はありますか?
分散テンプレートを別のカスタム要素でラップするにはどうすればいいですか?paper-item
としましょう。
これは私の作業コードです。 my-view
インサイド
<my-view>
<template>[[ item.name ]]</template>
</my-view>
私は別のカスタム要素(のはpaper-item
を言わせて)でtemplate
効果的な子どもをラップしている私は何を達成したい
<template id="Repeater" is="dom-repeat">
</template>
と
_templatize() {
const repeater = this.$.Repeater
const template = this.queryEffectiveChildren('template')
repeater.templatize(template)
}
を持っています。もちろん動作しません
_templatize() {
const repeater = this.$.Repeater
const template = this.queryEffectiveChildren('template')
const item = this.create('paper-item')
item.appendChild(template.content)
repeater.templatize(item)
}
よう
何か。