As title suggests, I am trying to use firebase-query element to do query for an array of keys which in return I should get bunch of objects per each key from the query. This can easily be done in java or swift , but when it comes to polymer elements I can't figure it out.
I have tried putting firebase-query in a dom-repeat but doesn't seem to work. I also tried changing the equal-to key which it doesn't seem to initiate the query for the new key.
See below for code :
<!doctype html>
<html>
<head>
</head>
<body>
<template is="dom-bind" id="scope">
<!-- .......other code -->
<!-- condKey is from the array I need to loop -->
<!--through and array comes from another query-->
<firebase-query
id="myQuery"
app-name="ProjectName"
order-by-child="childName"
path = "/nodeKey"
equal-to=[[condKey]]
data="{{results}}">
</firebase-query>
<!-- ***data comes from another query -->
<div id="listContainer">
<template is="dom-repeat" items=[[data]] as="item">
<div class="item">
<div class$="{{_computeItems(item.key)}}"></div>
<template is="dom-repeat" items={{results}} as="myresult">
<div>[[myresult.key]]</div>
</template>
</div>
</template>
</div>
<script>
scope._computeItems = function(key) {
console.log("key of query is: " , key);
scope.condKey = key ;
};
</script>
</template>
<!-- .......other code -->
</body>