我正在尝试向firebase插入一些数据,但是它没有定义customerName。我不明白代码的问题是什么。以下是我的代码。谢谢。
var orderDetailsRef = database.ref('orderDetails');
var customerName = $scope.CustomerName;
var customerContactNumber = $scope.customerContactNumber;
var pickdroneId = $scope.pickdroneId;
var orderId = $scope.orderId;
var orderDate = $scope.orderDate
var result = orderDetailsRef.push({
customerName: CustomerName,
customerContactNumber: customerContactNumber,
pickdroneId: pickdroneId,
orderId: orderId,
orderStatus: "Initiated",
orderDate: orderDate
});
console.log(result);
}