0

Here is Youtube link for issue

I am trying to change path using firebase-query as following

<firebase-query
        id="query"
        log
        order-by-child="name"
        app-name="appname1"
        path="/posts/[[collectionPath]]"
        data="{{posts}}">
</firebase-query> 

following is my data structure

enter image description here

Polymer({

  is: 'my-view2',

  properties: {
      collectionPath: {
      type: String,
      value: "",
      notify: true
    }
  },
  updatePath:function (selectedTab) {
    this.set('collectionPath', selectedTab);        
  }
});

On tab click I am calling function updatePath() like updatePath('Android')

But query is not returning new data when path changed. It return me data when I reload the app. Please help

4

1 回答 1

0

最后我自己做了,我想和你分享。

只需将路径设置为 null 即this.$.query.path = null; 如下代码

updatePath:function (selectedTab) {
  this.$.query.path = null;
  this.set('collectionPath', selectedTab);        
}
于 2016-10-19T06:35:51.720 回答