错误:[$喷油器:NOMOD]模块'ui.bootstrap“不可!而噶运行webstorm [英] Error: [$injector:nomod] Module 'ui.bootstrap' is not available! while Karma run in webstorm

查看:242
本文介绍了错误:[$喷油器:NOMOD]模块'ui.bootstrap“不可!而噶运行webstorm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了以下错误webstorm运行人缘试运行,而

Hi I'm getting the following error in webstorm while running karma test run

Error: [$injector:nomod] Module 'ui.bootstrap', 'ui.unique' 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.

我看着在互联网上,他们说检查依赖文件ui.bootstrap可能这样被错过。

i looked in the internet and they said to check dependency file ui.bootstrap might be missed like that.

但应用程序正常工作

和而只有测试它显示了这个错误。

and while testing only it shows this error

在我的karma.conf.js

in my karma.conf.js

files: [
            //angular files

            'app/js/vendor/angular/ui.bootstrap.js',
            'app/js/vendor/angular/ui.bootstrap-0.10.0.js',

            'app/js/vendor/angular/angular.js',
            'app/js/vendor/angular/angular-mocks-0.10.6.js',

            'app/js/app.js',
            'test/**/*Spec.js'
        ], 

在我的模块declartion

in my Module declartion

var myApp = angular.module('myApp', ['ui.bootstrap']);

你能帮??

推荐答案

ui.unique 是的 角-UI-utils的 。这已被列入因果报应的conf并注入到应用程序以及,如果使用。

ui.unique is a module from angular-ui-utils. That has to be included in karma conf and injected to the app as well, if being used.

var myApp = angular.module('myApp', ['ui.bootstrap', 'ui.utils']);

也可以专门注入 ui.unique 而不是注入 ui.utils ,如果只使用独特的模块

or you can specifically inject ui.unique instead of injecting ui.utils, if only unique module is used.

这篇关于错误:[$喷油器:NOMOD]模块'ui.bootstrap“不可!而噶运行webstorm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆