One difference between AngularJS' $location and window.location
Recenently, I encountered a problem.
Client side code is:
$http({
                    url: "/api/runtimelicense"
, method: "GET"
                })
                .success(function (data) {
window.location('#/search');
                })
                .error(function () {
                });
Server side code is:
DbContext_context = GetContext(); // Just get dbcontexnt.
_context.MyDBSet.Where(s => s.ID == myID).ToList(); // When this request is from IE,it always throw exception with message "The connection was not closed. The connection's current state is open."; but if this request is from Chrome, all are ok.
At beginning, I felt very strange, as I know, browser should not impact server side by the same http request. I open Fiddler to see, there is an AngularJs digest error in IE, this error causes another request, it means there are two same http request to submit. I googled this question, but got nothing. I just repalce "window.location('#/search');" with "$location.path('/search');" , this issue is solved. Now, I still cannot know the details clearly. So, remain 2 questions:
1) Why does IE Angular digest exception?
2) Why does exception can cause another request?
One difference between AngularJS' $location and window.location的更多相关文章
- window.location.href = window.location.href 跳转无反应 a 超链接 onclick 点击跳转无反应
		
错误写法 , 主要是在 href="#"这里 <a href="#" id="send" onclick="return b ...
 - window.location.href = window.location.href  window.location.reload()
		
w 0-会议预订提交了预订日期,预订成功后默认显示仅显示当前日期的新页面若显示预定日的信息,则可以对预定日存入cookie: http://stackoverflow.com/questions/24 ...
 - window.location和window.location.href和document.location的关系
		
1,首先来区分window.location和window.location.href. window.location.href是一个字符串. 而window.location是一个对象,包含属性有 ...
 - JS中 window.location 与window.location.href的区别
		
疑惑:window.location='url' 与window.lcoation.href='url'效果一样,都会跳转到新页面,区别在哪?查得的资料如下: 1:window.location是页 ...
 - js 刷新页面window.location.reload();
		
Javascript刷新页面的几种方法:1 history.go(0)2 window.location.reload() window.location.reload(true) 3 ...
 - window.top.location.href 和 window.location.href 的区别
		
"window.location.href"."location.href"是本页面跳转. "parent.location.href" 是 ...
 - window.location事件
		
一.最外层top跳转页面,适合用于iframe框架集 top.window.location.href("${pageContext.request.contextPath}/Login_g ...
 - 解决微信浏览器无法使用window.location.reload()刷新页面
		
解决方法: 使用 window.location.href=window.location.href+随机数 代替 window.location.reload(). function r ...
 - javascript宿主对象之window.location
		
location属性是一个用来存储当前页面URL信息的对象. 下面我们通过循环来列出location对象的完整属性列表: for(var i in location){ if(typeof locat ...
 
随机推荐
- 关于页面传值页面的跳转,以及spring mvc 框架的流程问题
			
list页面 1.点击页面后,进入后台的list方法中,通过findPage()查询数据的,findPage中含有findList(): 2.如果页面没有输入查询条件,那么则显示所有数据集合,如果页面 ...
 - Tomcat服务器的安装和配置
			
一.Tomcat下载 可以直接从Apache的网站上下载Tomcat(http://tomcat.apache.org/),进入首页后,在左边Download一栏可选择你要下载的版本,点击便可进入To ...
 - zl
			
https://mooc.study.163.com/course/2001281002?tid=2001392029&_trace_c_p_k2_=a1ef6cb9a64342008c8f5 ...
 - oracle如何快速导入导出文本格式数据
			
导出工具:sqluldr2工具说明:sqluldr2再以安装oracle客户端的环境下下无需再安装其它软件,只需将对应的软件包拷贝至对应目录,即可运行导出数据导出示例:--linux环境导出示例:/d ...
 - 20145232 韩文浩 《Java程序设计》第4周学习总结
			
教材学习内容总结 · Chapter 继承与多态 继承:避免多个类间重复定义共同行为.继承可以理解为一个对象从另一个对象获取属性的过程. 所有Java的类均是由java.lang.Object类继承而 ...
 - java基础-day18
			
第07天 集合 今日内容介绍 u HashSet集合 u HashMap集合 第1章 HashSet集合 1.1 Set接口的特点 Set体系的集合: A:存入集合的顺序和取出集合的顺序不一 ...
 - 在Windows 8.1中安装必应输入法
			
鉴于目前Windows 8.1中自带的输入法存在一些Bug以及功能上的不完整性(比如,在Office 2013中删除掉错误的字符后快速输入第一个字母将丢失的问题:在QQ聊天窗口中文输入状态下快速输入省 ...
 - 2.mongodb可视化工具
			
(1)去robomongo官方网址下载,官网地址(https://robomongo.org/)选择相应的版本. (2) tar -xzf robo3t-1.2.1-linux-x86_64-3e50 ...
 - Asp .Net core 2 学习笔记(1) —— Starup
			
这个系列的初衷是便于自己总结与回顾,把笔记本上面的东西转移到这里,态度不由得谨慎许多,下面是我参考的资源: ASP.NET Core 中文文档目录 官方文档 记在这里的东西我会不断的完善丰满,对于文章 ...
 - wpf 导出Excel
			
private void Button_Click_1(object sender, RoutedEventArgs e) { ExportDataGridSaveAs(true, this.data ...