Polymer 1 嵌套 dom-if within dom-repeat not updateing when data changes

Polymer 1 nested dom-if within dom-repeat not updating when data changes

当数据发生变化时,如何在 dom-repeat 的更新中制作 dom-if 模板??

此处示例http://jsbin.com/xatala/edit?html,output

在示例中,数据在 1.5 秒后更改,但模板内的 dom-if 不是 re-evaluated/rendered。您可以在 console.log 中看到这一点。数据已更改但视图未更新。

您将如何完成这项工作,其背后的原因是什么?!

下面是有效的例子:http://jsbin.com/nejadibuju/edit?html,console,output

<template is="dom-if" 
  if="{{arrayItem(myItems.*, index, 'isGood')}}">
      [[item.title]] is SOOO good.
</template>

您缺少的是:

Explicit bindings to array items by index isn’t supported

Bin中添加了一些说明。 相关链接:

http://plnkr.co/edit/aOmw4e?p=preview