1
ウィンドウが閉じる前にコードを実行したいが、プロンプトを表示したくない。ここ は私のコードです:私のコードが実行取得されていないとして、未定義またはfalseを返すAngularjsプロンプトが表示されない状態で正しく実行されない
$window.onbeforeunload = function(){
$rootScope.$broadcast('war-change');
return undefined;
};
$scope.$on('war-change',function(){
console.log('here');
//Execute some more code here.
});
が機能していません。 助けていただければ幸いです。