$scope.$on('$locationChangeStart', function(e) { if(!tfOrder && comm.getStorage('orederlistLen')>0){ if(confirm("退出将清空投注")){ //浏览器自带返回按钮点击时,清空投注
//code
}else{ e.preventDefault(); //阻止后退 } } });
http://www.cnblogs.com/gaoruixin/p/6070502.html
$scope.$on('$locationChangeStart', function(e) { if(!tfOrder && comm.getStorage('orederlistLen')>0){ if(confirm("退出将清空投注")){ //浏览器自带返回按钮点击时,清空投注
//code
}else{ e.preventDefault(); //阻止后退 } } });
http://www.cnblogs.com/gaoruixin/p/6070502.html
转载于:https://www.cnblogs.com/web-fusheng/p/7652759.html