Before using angularFireCollection() I was using angularFire(). But angularFire listening on value instead of childs so someone suggest me to use angularFireCollection.
But now angularFireCollection return arrays. =.=
So any idea in this situation?
I want my data return in objects and listening on childs.
To access the key names from the array returned by angularFireCollection, you can use the $id property:
<ul>
<li ng-repeat="item in items">{{item.$id}}: {{item.val}}</li>
</ul>
<script>
$scope.items = angularFireCollection(new Firebase(url));
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With