我似乎无法获得身份证件。它返回的所有内容都是cannedLst.name,但我似乎无法获取ID。
.controller("Canned", ["$scope", "$firebaseArray","Data", function($scope, $firebaseArray, $ionicModal, Data) {
$scope.deleteItem = function(cannedLst) {
$scope.cannedLsts.$remove(cannedLst);
};
$scope.addData = {};
$scope.addPrice = function() {
var price = $scope.addData.store1price;
var editRef = new Firebase('https://pricemonitoringsys.firebaseio.com/dti/-KB7IIkAqZ07SfUOKw0l');
editRef.update({
store1price: price
});
};
var cannedRef = new Firebase("https://pricemonitoringsys.firebaseio.com/dti")
$scope.cannedGoods = $firebaseArray(cannedRef);
var query = cannedRef.orderByChild("category").equalTo("canned");
$scope.cannedLsts = $firebaseArray(query);
}
])