【发布时间】:2014-06-24 09:40:40
【问题描述】:
我无法使 requirejs 在 ie8 中与 angularjs 项目和 webjar 一起工作,(我在 firefox、chrome 中没有错误)。
使用 ie 调试栏出现此错误:
Object doesn't support property or method
在这段代码中:
webjarsAngularjsChildren.forEach(function(child) {
webjarsAngularjsPaths[child] = webjars.path("angularjs", child);
webjarsAngularjsShim[child] = ["angular", "webjars!angular.js"];
});
此代码是使用 requirejs/webjars 生成的
forEach 循环是否与 IE 8 兼容?
我该如何解决这个问题?
【问题讨论】:
-
尝试较新版本的 Angular WebJar 和较新版本的
webjars-locator库以取消此操作。 -
如何设置 webjars-locator 的版本?我在 Angular WebJar 中使用最后一个版本:1.3.0-beta.2
-
取决于你的构建工具是什么。文档可能会有所帮助:webjars.org/documentation
-
我使用 "org.webjars" %% "webjars-play" %2.2.0,与 play 2.2.0
-
添加:"org.webjars" % "webjars-locator" % "0.14"
标签: angularjs internet-explorer internet-explorer-8 requirejs webjars