1

I'm using the firebase-query element which is working at first attempt in setting the path.

<firebase-query id="queryTag"
                    path="[[_getProductTagsURL(productData)]]"
                    data="{{tags}}"></firebase-query>

I then use the data by using dom-repeat:

<template is="dom-repeat" items="{{tags}}" index-as="index" id="tags">
      <paper-item>
        <paper-item-body two-line>
          <div><span>[[item.$key]]</span></div>
          <div secondary><span>[[item.description]]</span></div>
        </paper-item-body>
        <paper-icon-button icon="delete" on-click="_deleteItem"></paper-icon-button>
      </paper-item>
</template>

And here's the function that returns the URL path for the firebase-query element:

_getProductTagsURL: function(data) {
        console.log('/users/' + this.user.uid + '/products/' + data.key + '/tags');
        return '/users/' + this.user.uid + '/products/' + data.key + '/tags';
      }

Every time the path changes it logs the correct path. When the path of firebase-query is set for the first time, the dom-repeat displays the correct data, but when changed it doesn't display anything.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

0 Answers0