[英]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不会被重新评估/渲染。 您可以在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>
你缺少的是:
Bin中添加了一些解释。 相关链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.