您是否曾经遇到过仅 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/