【发布时间】:2016-08-04 18:45:25
【问题描述】:
我有一个按数字组织的对象列表/数组,我将对象名称视为“id”。我正在使用 firebase,但我不知道如何获取 ID 号本身。任何帮助都会很棒
//js
myFirebaseRef.once("value", function(snapshot) {
var list = snapshot.val();
$scope.items = list
console.log($scope.items)
})
//log $scope.items
[1: Object, 2: Object, 3: Object, 4: Object, 5: Object, 6: Object, 7: Object //...
【问题讨论】:
标签: javascript angularjs node.js firebase firebase-realtime-database