我试图将参数从一个函数传递给另一个函数,所以我可以在用户执行deleteProcess
时将params传递给后端我打开模态窗口我有yesCallback
这意味着如果用户点击是然后只删除。
所以deleteProcess
有参数,我如何传递给deleteInventory
,以便我可以使用prcDeleteFactory.deletePrcInventory(inventory,processId);
将其发送到后端。
ctrl.js
function deleteInventory(inventory, processId) {
console.log("facotry executed");
$scope.confirmationWin.close();
prcDeleteFactory.deletePrcInventory(inventory, processId);
}
$scope.deleteProcess = function(inventory) {
var inventory = inventory;
var processId = $stateParams.processId;
$scope.confirmationWin.open().center();
$scope.messageText = $scope.processDTO.deleteMessageToDisplay;
$scope.yesCallback = deleteInventory(invenotry, processId);
}