AngularJS:"错误:意外的调用方法或属性access.undefined"只有在IE 8 [英] AngularJS: "Error: Unexpected call to method or property access.undefined" only in IE 8
问题描述
你有过错误错误:意外的调用方法或属性access.undefined只有IE8?是什么造成的呢?你是怎么解决的?
Have you ever had the error "Error: Unexpected call to method or property access.undefined" only IE8? What was causing it? How did you solve it?
- 注意:它假定同一code在Chrome中正常工作,火狐,Safari
-- Note: It assumes the same code works fine in Chrome, Firefox, Safari
编辑:上下文
我要建一个Facebook页面标签插件与AngularJS +谷歌应用程序引擎的Python。
I'm building a facebook page tab plugin with AngularJS + Google App Engine Python.
我用的十定制指令无论是由我或者由角UI团队和4-5控制器。
I use a dozen custom directives either written by me or by the angular-ui team and 4-5 controllers.
一切都在Chrome,Safari和Firefox正常工作,但不是在IE8。
Everything works fine in Chrome, Safari and Firefox, but not in IE8.
推荐答案
的问题是,IE8不承认定制的元素。
The problem is that IE8 does not recognize "custom" elements.
使用替换:真正的在你的指令,声明在元素的形式(限制:E),并使用IE希夫(我用角UI的IE浏览器的下脚,并宣布我的自定义标签有)
Use "replace:true" in your directives declaration that are in element form (restrict: 'E') and use IE shiv (I used angular-ui's IE shiv and declared my custom tags there).
详见以下链接:
<一href=\"https://github.com/angular/angular.js/issues/1933\">https://github.com/angular/angular.js/issues/1933
http://angular-ui.github.com/#ieshiv
这篇关于AngularJS:&QUOT;错误:意外的调用方法或属性access.undefined&QUOT;只有在IE 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!