AngularJS在IE8未定义 [英] AngularJS is undefined in IE8

查看:1233
本文介绍了AngularJS在IE8未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AngularJs大规模应用。

I'm working on a massive application that uses AngularJs.

当我查看我IE8得到这样的超级漂亮的控制台错误页面对象不支持属性或方法模块对象没有按'T支持属性或方法窗口小部件无法获得属性的值控制器:对象为null或undefined IE浏览器真的很烂,你不能只是告诉他们下载铬?

When I view the page in IE8 I get super nifty console errors like Object doesn't support property or method 'module', Object doesn't support property or method 'widget', unable to get value of the property 'controller': object is null or undefined, and IE really sucks, cant you just tell them to download chrome?

与它战斗了一段时间后,我决定记录的typeof角,到控制台返回未定义

After fighting with it for a while I decided to log the typeof angular, to which the console returned undefined.

一切都按预期在IE9,IE10,而且不吸所有的浏览器。

Everything works as expected in IE9, IE10, and all browsers that don't suck.

请帮帮忙!

修改

看来,棱角分明是未定义它得到我的第一个控制器之前,所以我不认为这与做ieshim ...

It appears that angular is undefined before it gets to my first controller, so I don't think it has to do with the ieshim ...

推荐答案

因此​​,这完全是我不好(或者说这个应用程序几个月前开始的家伙)。

So this was totally my bad (or the guy that started this app months ago).

我的应用程序控制器有 VAR角= ||角{} 上方,IE8不同意本声明同意。

My application controller had var angular = angular || {} at the top, IE8 didn't agree with this declaration.

在去除一切都很好。

这篇关于AngularJS在IE8未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆