???$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
angularjs 阻止浏览器自带的回退
原文地址:http://www.cnblogs.com/web-fusheng/p/7652759.html