这是Youtube链接的问题
我试图使用firebase查询更改路径,如下所示
<firebase-query
id="query"
log
order-by-child="name"
app-name="appname1"
path="/posts/[[collectionPath]]"
data="{{posts}}">
</firebase-query> 以下是我的数据结构

Polymer({
is: 'my-view2',
properties: {
collectionPath: {
type: String,
value: "",
notify: true
}
},
updatePath:function (selectedTab) {
this.set('collectionPath', selectedTab);
}
});在选项卡上单击,我将调用像updatePath('Android')一样的函数updatePath('Android')
但是,查询不会在路径更改时返回新数据。当我重新加载应用程序时,它会返回给我数据。请帮帮忙
发布于 2016-10-19 06:35:51
最后,我自己做了,我想和你们分享。
只需将路径设置为null,即this.$.query.path = null;如下所示
updatePath:function (selectedTab) {
this.$.query.path = null;
this.set('collectionPath', selectedTab);
}https://stackoverflow.com/questions/40121192
复制相似问题