В полимере 1.2.3. Возможно ли, чтобы dom-repeat
использовал контент в качестве шаблона и привязал значения к предоставленным элементам?
Пользовательский элемент:
<dom-module id="modify-collection">
<template>
<div>
<template is="dom-repeat" items="[[collection]]">
<content></content>
</template>
</div>
</template>
</dom-module>
Использование:
<modify-collection collection="{{things}}">
<list-item resource="[[item]]"></list-item>
</modify-collection>
Я просмотрел следующие ресурсы без помощи:
Полимер: как наблюдать за изменением в <content> Свойства
Полимер 1.0 сопоставляет эквивалент ссылок
Связывание данных между вложенными полимерными элементами
https://github.com/grappendorf/grapp-template-ref
https://github.com/Trakkasure/dom-bindref
https://github.com/Polymer/polymer/issues/1852
https://github.com/Polymer/polymer/pull/2196
Обновление 2016-02-03: из Полимерной команды (PR # 2196), в будущем будет обеспечена лучшая поддержка для этого, чтобы помочь адресуйте некоторые из недостатков.