我有这个功能,当我点击按钮时什么也没发生。我只是在控制台日志中得到 RESPONSE,但在那之后我什么也没得到。$viewContentLoaded 有问题。有什么建议吗?
$scope.ConfirmTicketPayOut = function (ticketPin, username) {
$scope.ticketPin = ticketPin;
localStorage.setItem("ticketPin", ticketPin);
accountDataProviderService.confirmTicketPayOut(ticketPin, username)
.then(function (response) {
$scope.confirmTicketPayOut = response;
console.log("RESPONSE: ", $scope.confirmTicketPayOut);
$scope.$on('$viewContentLoaded', function () {
console.log("VIEW CONTENT LOADED");
if ($scope.confirmTicketPayOut.Result == true) {
console.log("RETURN TRUE");
var w = $window.open('/account/ticketprint');
angular.element(w).bind('load', function () {
w.print();
});
}
});
});
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1586 次 |
| 最近记录: |