我正在尝试获取最后加载项目的优先级,但我在第2版中遇到了困难:
$scope.items = $firebase(new Firebase("https://***.firebaseio.com/"));
$scope.items.$on('loaded', function() {
console.log($scope.items.$child(".priority"));
});
});
这让我:
Uncaught TypeError: Cannot call method 'ref' of undefined
我接近了吗?