聚合物1嵌套的dom(如果dom重复内)在数据更改时不更新 [英] Polymer 1 nested dom-if within dom-repeat not updating when data changes
问题描述
当数据更改时,如何在dom-repeat
更新中创建dom-if
模板?
How do you make dom-if
templates within dom-repeat
's update when the data changes??
此处的示例
在该示例中,数据在1.5秒后发生更改,但是模板内部的dom-if未被重新评估/渲染.您可以在console.log中看到它.数据已更改,但视图未更新.
In the example the data changes after 1.5 seconds but the dom-if's inside the template aren't re-evaluated/rendered. You can see this in the console.log. The data has changed but the view isn't updated.
您将如何进行这项工作,其背后的原因是什么?!
How would you make this work and what is the reasoning behind it?!
推荐答案
以下是适用的示例:
您所缺少的是: 在Bin中添加了一些说明.
相关链接: Some explanations are added in the Bin.
Related links: http://plnkr.co/edit/aOmw4e?p=preview 这篇关于聚合物1嵌套的dom(如果dom重复内)在数据更改时不更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!