Javascript 添加角度传单指令后Grunt生成失败

Javascript 添加角度传单指令后Grunt生成失败,javascript,angularjs,leaflet,Javascript,Angularjs,Leaflet,我刚刚在我的项目中添加了angular传单指令,当我用Grunt构建它时,它现在失败了。依赖项是使用bower添加的。这个项目是用约曼角发电机建造的 在这里,我在app.js中包含了传单指令 angular .module('statsApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'leaflet-directive' ]) 现在,我只是想让事情开始 当Grunt构建失败时

我刚刚在我的项目中添加了angular传单指令,当我用Grunt构建它时,它现在失败了。依赖项是使用bower添加的。这个项目是用约曼角发电机建造的

在这里,我在app.js中包含了传单指令

angular
  .module('statsApp', [
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngRoute',
    'leaflet-directive'
  ])
现在,我只是想让事情开始

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

    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.

这个帖子解决了我的问题。这并不是针对我要添加的模块,而是针对因果报应测试失败,因为他们不知道传单指令模块


谢谢,这正是我需要的。在我的yeoman应用程序中,我所要做的就是在test/karma.conf.js的文件数组中添加'bower_components/angular传单指令/dist/angular传单指令.js'。