javascript - how to give a unique id to firebase-query inside a dom repeat so i can clear its path every time data is fetched? -


i have following code in polymer

   <template id="repeater" is="dom-repeat" items="[[data]]" as="mydata">            <firebase-query                  id="query"                  app-name="app name"                  path="temp/check/[mydata.$key]"                  data="{{tempdata}}">            </firebase-query>            <!--i displaying data here -->            <!-- once data displayed want fetch firebase query id='query'                  , set path null next time inside dom repeat gets                  required fields , not null objects-->    </template> 

anyone have idea how give unique id firebase query or how set path null once data displayed.

what did wrap firebase-query element inside own component. way don't have worry unique id's.

outer component:

<template is="dom-repeat" items="[[filtereditems]]" as="evt">     <firebase-item firebase-path="{{evt.path}}"></firebase-item> </template> 

inner component (firebase-item):

<firebase-query id="whateveryouwant" path="[[firebasepath]]"></firebase-query> 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -