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

adjuremods
  • 2,938
  • 2
  • 12
  • 17
Munish Kapoor
  • 3,141
  • 2
  • 26
  • 41

1 Answers1

0

Finally i did it myself and i would like to share with you.

Just set path to null i.e this.$.query.path = null; as following code

updatePath:function (selectedTab) {
  this.$.query.path = null;
  this.set('collectionPath', selectedTab);        
}
Munish Kapoor
  • 3,141
  • 2
  • 26
  • 41