我有一个表,显示的事务列表,现在我想单独打印特定行,因为我使用了printToCart
函数并传递了该行中的项目,并且数据也传递并分配给{{1但是,这些值并没有在我的html中传递,我的意思是无法在html中查看。
JS:
$scope.printValues
打印HTML:
$scope.printToCart = function(printSectionId,item) {
$scope.printValues = item;
var innerContents = document.getElementById(printSectionId).innerHTML;
var popupWindow = window.open('', '_blank', 'width=900,height=800,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
popupWindow.document.open();
$scope.datagetinLoading = false; $('#preparingToSaveInvoice').modal('hide');
$('#preparingToPrintInvoice').modal('hide');
$('#preparingToDownloadPDF').modal('hide');
$('#printReceiptDetailsWaiting').modal('hide');
popupWindow.document.write('<html><head><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"><body onload="window.print()"><style>#footer { position:relative; bottom:0; width:100%; height: auto; } #header { display: flow-root; height: auto; border-bottom: 1px solid #333;} </style><div class="wrapper" style="padding-right: 10px;">' + innerContents + '</div></body></html>');
popupWindow.document.close();
};