Ham*_*nit 3 polymer polymer-1.0
我想在帖子数据中显示一个对象内容(评论)(使用firebase-collection):这是firebase中帖子的结构:
"Publication" : {
"date":"22-06-2015",
"content" : "post example",
"comments": {
//a post has too many comments on it
}
}
Run Code Online (Sandbox Code Playgroud)
我的目标是添加另一个dom-repeat来显示评论,但我看不到任何东西.这是代码示例(第一个模板正如我提到的那样正常工作)
<template is="dom-repeat" items="{{posts}}" as="post">
<!-- Content here is appearing correctly -->
<template is="dom-repeat" items="{{post.comments}}" as="commentaire">
<span>{{commentaire.date}}</span>
</template>
</tempalte>
Run Code Online (Sandbox Code Playgroud)
我按照Polymer Migration文档但没有结果,如果有任何解决方案我会感激不尽.
小智 5
我认为你的comments属性需要是一个数组才能正确绑定.
| 归档时间: |
|
| 查看次数: |
1850 次 |
| 最近记录: |