简体   繁体   English

在IE8中的iFrame中运行AngularJS Application的空白页面

[英]Blank page on running AngularJS Application in iFrame in IE8

I'm trying to run an AngularJS Application in an iFrame in IE8. 我正在尝试在IE8中的iFrame中运行AngularJS应用程序。 I get a blank page. 我得到一个空白页面。
Observed Behavior: 观察到的行为:
1. Works fine in normal browser window of IE8. 1.在IE8的普通浏览器窗口中正常工作。
2. Works fine in iFrame of Chrome and FireFox. 2.适用于Chrome和FireFox的iFrame。
3. Works fine if I right click and refresh the iFrame. 3.如果我右键单击并刷新iFrame,则工作正常。
4. HTML is fully loaded (Checked in view source). 4. HTML已完全加载(在视图源中选中)。 The AngularJS controller is not triggered. AngularJS控制器未被触发。 None of the alerts and console.logs are displayed. 没有显示警报和console.log。
5. No JS errors are thrown 5.没有抛出JS错误

How do I enable trigger of AngularJS controller, can I manually trigger it on window.onload ? 如何启用AngularJS控制器的触发器,我可以在window.onload上手动触发吗? Any insights and suggestions would help. 任何见解和建议都会有所帮助。 Unfortunately I have to run the application inside an iframe in IE8 ? 不幸的是我必须在IE8中的iframe中运行应用程序? Upgrading the browser or choosing different browser is not an option. 升级浏览器或选择其他浏览器不是一种选择。
Thanks! 谢谢!
SKR SKR

Finally arrived at a solution. 终于到了解决方案。 As I had mentioned in the issue description, the page works fine on refresh. 正如我在问题描述中提到的,页面在刷新时工作正常。 So the solution is to refresh the page on load. 所以解决方案是在加载时刷新页面。
I used the One time page refresh solution mentioned for the problem , in particular solution given by Cokegod . 我使用了针对该问题提到的一次性页面刷新解决方案,特别是Cokegod给出的解决方案。
There is no perceptible difference in loading time. 加载时间没有明显的差异。 The best part is it works in IE8! 最好的部分是它在IE8中工作!

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

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