简体   繁体   English

IE9中的Angular JS页面加载问题

[英]Angular JS Page Load Issue in IE9

I have an angularjs SPA that is running into problems in IE9. 我有一个angularjs SPA,它在IE9中遇到问题。 The app works great in Chrome and Firefox. 该应用程序在Chrome和Firefox中运行良好。 There is quite a bit data to download on the initial load and many dependencies managed through requirejs. 初始加载时需要下载大量数据,并且许多需求通过requirejs进行管理。

When I view the page in a fresh IE session I get a part of the webpage ie some parts just don't display on the screen. 当我在新的IE会话中查看页面时,我得到了网页的一部分,即某些部分只是不显示在屏幕上。 I check the network requests and they are short some items. 我检查了网络请求,他们缺少一些物品。 If I reload at this point, the page will load fine because it already cached some of the files so it doesn't need to download them. 如果我此时重新加载,则该页面将正常加载,因为它已经缓存了一些文件,因此不需要下载它们。 However if I clear cache and retry the same thing will happen. 但是,如果我清除缓存并重试,则会发生相同的情况。

Missing files are not consistent, meaning that it's not always the same files. 丢失的文件不一致,这意味着它并不总是相同的文件。

Additionally, in console I can see the following error: 此外,在控制台中,我可以看到以下错误:

$digest already in progress $ digest已经在进行中

This app is an open source project that I am intimately familiar with, however I am not sure even where to start troubleshooting this. 这个应用程式是我很熟悉的开放原始码专案,但是我不确定从哪里开始进行疑难排解。

Any ideas? 有任何想法吗?

Thanks in advance 提前致谢

You've got something trying to start up a digest cycle when one is already running. 当某人已经在运行时,您有某种尝试开始它的摘要循环。 You should check directives and any other code you have which calls either $apply() or $digest() directly. 您应该检查指令和您拥有的其他直接调用$ apply()或$ digest()的代码。

I would try commenting out all of those $apply() and $digest() calls and see what happens. 我会尝试注释掉所有$ apply()和$ digest()调用,然后看看会发生什么。 My guess is that the page will load successfully but you might not get everything on it updated. 我的猜测是该页面将成功加载,但是您可能没有更新所有内容。 So then you can open another question and we can see what can be done to get rid of the call which is trying to start another digest cycle. 因此,您可以打开另一个问题,我们可以看到可以做些什么来摆脱试图启动另一个摘要循环的调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM