angular 中不要使用location.href
location.href = '#/HKorderList?gid='+gid+'&gname='+encodeURIComponent(gname)+'&cPeriod='+$('#current_period').text()+'&totalmoney='+$('#bet_money').text()+'&reUrl='+'/pcddBet'+'&playid='+playid+'&spid='+spid;
在单页面应用中,会导致,history 跳转两次的情况:

要使用:
$location.url('/HKorderList?gid='+gid+'&gname='+encodeURIComponent(gname)+'&cPeriod='+$('#current_period').text()+'&totalmoney='+$('#bet_money').text()+'&reUrl='+'/pcddBet'+'&playid='+playid+'&spid='+spid);
代替!
angular 中不要使用location.href的更多相关文章
- 遇到问题-----JS中设置window.location.href跳转无效(在a标签里或这form表单里)
问题情况 JS中设置window.location.href跳转无效 代码如下: ? 1 2 3 4 5 6 7 8 <script type="text/javascript&quo ...
- springMVC框架在js中使用window.location.href请求url时IE不兼容问题解决
是使用springMVC框架时,有时候需要在js中使用window.location.href来请求url,比如下面的路径: window.location.href = 'forecast/down ...
- javascript 中设置window.location.href跳转无效问题解决办法
javascript 中设置window.location.href跳转无效问题解决办法 问题情况 JS中设置window.location.href跳转无效 原因是 a标签的href跳转会执行在wi ...
- window.location.href和window.open的几种用法和区别
使用js的同学一定知道js的location.href的作用是什么,但是在js中关于location.href的用法究竟有哪几种,究竟有哪些区别,估计很多人都不知道了. 一.location.href ...
- IE6下window.location.href不跳转到相应url
前天一同事遇到个看似很诡异的问题,就是<a href="javascript:void(0);" onclick="window.location.href=url ...
- JavaScript在IE6下超级链接window.location.href不跳转的bug 及 解决方案
今天遇到个很诡异的问题,就是<a href="javascript:void(0);" onclick="window.location.href=url" ...
- window.location.href重定向失败的问题
如题,在js中通过window.location.href=URL来跳转到另一个页面(也可以是另一个项目的另一个页面). 打开的页面地址是:www.a.com/project1/index 要跳转的页 ...
- window.location.href后携带参数
JS文件中: window.location.href后可携带参数,但是不安全,虽然在技术上是可以实现的 1.传参:window.location.href = "RecordCare.as ...
- windows.open window.location.href的用法和区别
window.location.href 只能在当前页面打开,不能用新窗口打开 windows.open("URL","窗口名称","窗口外观设定& ...
随机推荐
- python下载网页上公开数据集
URL很简单,数据集分散开在一个URL页面上,单个用手下载很慢,这样可以用python辅助下载: 问题:很多国外的数据集,收到网络波动的影响很大,最好可以添加一个如果失败就继续请求的逻辑,这里还没有实 ...
- hdu5727
Necklace SJX has 2*N magic gems. N of them have Yin energy inside while others have Yang energy. SJX ...
- springMVC多视图的支持
1.在springmvc.xml中加上 <!-- 多视图的支持 --> <bean class="org.springframework.web.servlet.view. ...
- Hdu 1455
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> ...
- Interleaving String,交叉字符串,动态规划
问题描述: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Give ...
- Java管理扩展指南之JMX技术总览
JMX(Java管理扩展)系列 JMX(Java管理扩展)系列旨在介绍包含于Java基础版本(Java SE)中的JMX技术.本系列提供了如何使用JMX重要技术特性的诸多示例. 一.JMX技术总览简要 ...
- IntelliJ IDEA 返回上次编辑(鼠标停留)的地方
idea默认的是 : Ctrl + Alt + 左箭头,与笔记本的 旋转屏幕冲突: 找到: 我更改成了: Ctrl + CapsLock :暂时没发现冲突.
- 1.SpringMVC设计理念与DispatcherServlet
SpringMVC作为Struts2之后异军突起的一个表现层框架,正越来越流行,相信javaee的开发者们就算没使用过SpringMVC,也应该对其略有耳闻.我试图通过对SpringMVC的设计思想和 ...
- 三十一 Python分布式爬虫打造搜索引擎Scrapy精讲—chrome谷歌浏览器无界面运行、scrapy-splash、splinter
1.chrome谷歌浏览器无界面运行 chrome谷歌浏览器无界面运行,主要运行在Linux系统,windows系统下不支持 chrome谷歌浏览器无界面运行需要一个模块,pyvirtualdispl ...
- uva 12086 线段树or树状数组练习
题目链接 https://vjudge.net/problem/34215/origin 这个题就是线段树裸题,有两种操作,实现单点更新和区间和的查找即可,这里第一次学习使用树状数组完成. 二者相 ...