internet-explorer - AngularJS: "Error: Unexpected call to method or property access.undefined"仅在 IE 8 中

标签 internet-explorer internet-explorer-8 angularjs angularjs-directive

您是否曾经遇到过仅 IE8 的错误“错误:意外调用方法或属性 access.undefined”?是什么造成的?你是怎么解决的?

-- 注意:假设相同的代码在 Chrome、Firefox、Safari 中运行良好

编辑:上下文

我正在使用 AngularJS + Google App Engine Python 构建一个 facebook 页面选项卡插件。

我使用 十几个自定义指令由我或 angular-ui 团队和 4-5 个 Controller 编写。

在 Chrome、Safari 和 Firefox 中一切正常,但在 IE8 中却不行。

最佳答案

问题是 IE8 不能识别“自定义”元素。

在元素形式的指令声明中使用“replace:true”(限制:'E')并使用 IE shiv(我使用了 angular-ui 的 IE shiv 并在那里声明了我的自定义标签)。

在以下链接中查看更多信息:
https://github.com/angular/angular.js/issues/1933
http://angular-ui.github.com/#ieshiv

关于internet-explorer - AngularJS: "Error: Unexpected call to method or property access.undefined"仅在 IE 8 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15590746/

相关文章:

javascript - 如果用户使用 Internet Explorer 10 或更高版本,则更改 CSS 类

html - 在 Internet Explorer 中设计高分辨率屏幕

javascript - 如何在cakephp 3 .2的ctp文件中使用requestAction函数

javascript - 使用 AngularJS 动画起始页

javascript - ie9中光标跳到元素上方

CSS 伪激活 : Why wont :active background position shift wont work in IE?

JavaScript 在 IE8/IE7 中不工作,但在所有其他浏览器中都可以

javascript - 解析时间字符串并将其转换为 Javascript 中的日期对象

xml - 在 IE 中查看 XML 时如何禁用安全警告?

javascript - JQuery 自动完成 IE8(Web 服务 ASMX))