首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grunt构建在添加angular-leaflet-directive后失败

Grunt构建在添加angular-leaflet-directive后失败
EN

Stack Overflow用户
提问于 2014-08-14 06:35:24
回答 1查看 632关注 0票数 1

我刚刚将angular-leaflet-directive添加到我的项目中,当我使用Grunt构建它时,它现在失败了。该依赖项是使用bower添加的。这个项目是使用约曼角度生成器构建的。

这里我在我的app.js中包含了leaflet指令

代码语言:javascript
复制
angular
  .module('statsApp', [
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngRoute',
    'leaflet-directive'
  ])

现在,我只是在我的视图中有了<leaflet></leaflet>,只是为了让事情开始。

当Grunt构建失败时,我会收到以下错误消息

代码语言:javascript
复制
    Error: [$injector:modulerr] Failed to instantiate module statsApp due to:
    Error: [$injector:modulerr] Failed to instantiate module leaflet-directive due to:
    Error: [$injector:nomod] Module 'leaflet-directive' 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.
EN

回答 1

Stack Overflow用户

发布于 2014-08-14 06:44:51

这篇文章解决了我的问题。它不是特定于我添加的模块,而是特定于Karma测试失败,因为他们不知道leaflet-directive模块。

AngularJS Error: Module ngAnimate is not available

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25297326

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档