javascript - 获取错误 "Error: $injector:modulerr Module Error"

标签 javascript angularjs google-maps angular-google-maps

我想使用 angular-google-map api,但出现错误:"Error: $injector:modulerr Module Error"

我想使用浏览器 key 测试 Google-map-api。我得到了这个教程表格 How to use google-map-key

我尝试运行但出现上述错误。请查看使用 Google-Map Key 的演示 DEMO

最佳答案

2.2.x 版的谷歌地图对 nemLogging 有额外的依赖。如果您使用库的非缩小版本,您会收到以下错误:

Uncaught Error: [$injector:modulerr] Failed to instantiate module customMap due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api.models.parent due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api.models.child due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api.utils due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.extensions due to:
Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.providers due to:
Error: [$injector:modulerr] Failed to instantiate module nemLogging due to:
Error: [$injector:nomod] Module 'nemLogging' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

新的依赖在这个 github issue 上讨论.我建议包括那个新库,或者使用指南中指定的版本 (2.0.16)

关于javascript - 获取错误 "Error: $injector:modulerr Module Error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33244746/

相关文章:

javascript - 如何在 JavaScript 中检测并解析这些字符串格式之一?

javascript - 对于通过 Angular $http 发送的 JSON 对象属性,PHP 显示 "{"或 "["

javascript - Angularjs + Typescript,如何将 $routeParams 与 IRouteParamsService 一起使用

java - 数据库查询以获取范围内的记录

javascript - 当鼠标移动到 woocommerce 中的购物车图标时,如何创建幻灯片以显示产品?

javascript - OnClick 按钮在 Rails 中创建一个动态 div(使用 java 脚本或 jQuery)

javascript - 显示 : flex and svg 的奇怪鼠标事件

python - 类型错误 : cannot convert the series to <class 'float' >

html - 有人知道如何更改 Google map 导航箭头吗?

javascript - 动画化容器中的元素以动画化并包含 100% 的容器