I try to use firebase-collection, but whatever I try I always receive an empty array (in firebase I have a couple of entries)
<dom-module id="bar-foo">
<template>
<firebase-collection
id="barFoo"
location="https://bar-foo.firebaseio.com/items"
data="{{items}}"></firebase-collection>
<firebase-document location="https://bar-foo.firebaseio.com/item"
data="{{item}}"></firebase-document>
</template>
<script>
class BarFoo {
beforeRegister() {
this.is = 'bar-foo';
this.properties = {
items: {
notify: true,
observer: 'updated',
type: Array
}
}
}
updated(newList) {
// newList === this.items === []
...
}
}
Polymer(BarFoo);
</script>
</dom-module>
the firebase-document
element works! Any suggestions why I receive an empty list ?
Furthermore, when I manually add a new item to the firebase-collection I get the following in the console
this.$.barfoo.add('aaaa')
firebase-query-behavior.html:182 Adding new item to collection with value: aaaa
firebase-query-behavior.html:182 Firebase Event: "child_added" aaaa null
U {k: Yh, path: L, n: ae, lc: false}
And nothing happens in firebase :(