【发布时间】:2015-07-09 16:10:45
【问题描述】:
好的,我有这个按钮:
我有这个确认票的功能:
$scope.ConfirmTicketPayOut = function (ticketPin, username)
{
$scope.ticketPin = ticketPin;
localStorage.setItem("ticketPin", ticketPin);
accountDataProviderService.confirmTicketPayOut(ticketPin, username)
.then(function (response) {
$scope.confirmTicketPayOut = response;
if ($scope.confirmTicketPayOut.Result == true)
{
var w = $window.open('/account/ticketprint');
angular.element(w).bind('load', function () {
w.print();
});
}
});
}
我有问题,因为当用户单击按钮时,我需要打开带有数据的新窗口并调用打印选项。在这种情况下,我得到打印选项并且新窗口打开但页面是空白的,所以我的结论是在出现打印选项后加载页面。我需要同时加载页面和显示打印选项,但没有$timeout。这可能吗?
【问题讨论】:
标签: angularjs