Javascript AngularJS,window.onbeforeunload模拟
window.onbeforeunload的角度模拟是什么 我有一个模态对话框,我需要在卸载之前调用它Javascript AngularJS,window.onbeforeunload模拟,javascript,angularjs,Javascript,Angularjs,window.onbeforeunload的角度模拟是什么 我有一个模态对话框,我需要在卸载之前调用它 $scope.toggleModal = function (modalChoice) { switch (modalChoice) { case 'error': $scope.modalErrorShown = !$scope.modalErrorShown;
$scope.toggleModal = function (modalChoice) {
switch (modalChoice) {
case 'error':
$scope.modalErrorShown = !$scope.modalErrorShown;
break;
case 'end':
$scope.modalEndShown = !$scope.modalEndShown;
break;
}
}
我不需要检查更改路径或url。每当我想关闭页面、更改url、刷新等时,我都需要打电话
感谢您的关注。此处已存在可能的副本