草庐IT

module-manager

全部标签

javascript - Angular JS 错误 : [$injector:nomod] Module 'portfolioMockupApp.services' is not available

我正在尝试使用Karma编写一些单元测试,但收到以下错误:PhantomJS1.9.8(MacOSX)错误错误:[$injector:nomod]模块“portfolioMockupApp.services”不可用!您要么拼错了模块名称,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。http://errors.angularjs.org/1.3.3/$injector/nomod?p0=portfolioMockupApp.services在/Users/danielbogart/Documents/coding/work/portfolio-mockup/bower_

javascript - Webstorm IDE 和 AngularJS angular.module 未解析的方法

我正在为AngularJS项目使用WebstormIDE。我已经将AngularJS添加到库和自动完成等。工作正常。但是,WebstormIDE没有找到非常重要的函数angular.module()。我已经尝试了所有方法(重新安装等),但似乎仍然无法正常工作。有什么想法吗? 最佳答案 到目前为止,WebStormIDS没有任何进展ticket上面由@AllYouCanEat86引用,所以我不确定是否应该在不向WebStorm添加库的情况下修复它。一旦我遵循了thisanswer中给出的建议我的问题已解决,并且不再在WebStorm中

javascript - 为 Angular JS 启用 html 5 模式会抛出 JS 错误 : Failed to instantiate module due to: TypeError: Cannot read property 'html5Mode' of undefined

如何为AngularJS启用html5模式?'usestrict'varblogApp=angular.module('blogApp',['ngRoute']).config(['$routeProvider',function($routeProvider,$locationProvider){$routeProvider.when('/disclaimer',{templateUrl:'templates/disclaimer.html',controller:'DisclaimerCtrl'});$routeProvider.otherwise({redirectTo:'/'}

javascript - 如何使用 type=module 脚本中的代码

这个问题在这里已经有了答案:ES6Modules:Undefinedonclickfunctionafterimport(4个答案)关闭4年前。我不明白为什么这个微不足道的代码不起作用:index.html:ShowMessageshowImport.js:importshowMessagefrom'/show.js';functionshowImportedMessage(){showMessage();}show.js:exportdefault"WhydoIneedthis?";exportfunctionshowMessage(){alert("Hello!");}它由NPMh

javascript - 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'

在尝试使用Webpack4和Babel7构建React应用程序时,我遇到了以下错误。ERRORin./src/index.jsModulebuildfailed(from./node_modules/babel-loader/lib/index.js):Error:Cannotfindmodule'babel-preset-react'from'/Users/me/Desktop/reflask'-Ifyouwanttoresolve"react",use"module:react"-Didyoumean"@babel/react"?atFunction.module.exports[

javascript - require.js 未捕获类型错误 : cannot read property '__module_path__; of undefined

所以我刚刚开始尝试掌握require.js,但它似乎不起作用。当我使用标签将其包含在我的html中时:在chrome中加载页面时出现以下错误UncaughtTypeError:Cannotreadproperty'__MODULE_PATH__'ofundefined->require.js:538在firefox中我得到一个稍微不同的错误:TypeError:parentisundefined->require.js:538不知道我怎么会导致这个问题,因为它是require.js的全新安装,我的main.js中还没有代码。提前致谢 最佳答案

javascript - Node JS 在 module.exports 中调用一个 "local"函数

如何在module.exports声明中从另一个函数中调用一个函数?我有MVC结构Nodejs项目和一个名为TestController.js的Controller。我想在Controller中访问方法,但是使用this关键字会出现以下错误:cannotcallmethodgetNameofundefined"usestrict"module.exports={myName:function(req,res,next){//accessingmethodwithincontrollerthis.getName(data);},getName:function(data){//code}

javascript - 错误 : Cannot find module 'jade~'

我是Nodejs的新手。我使用CompoundJs创建了一个crud操作。应用程序运行良好,直到我尝试提醒一个值,之后我收到错误500Error:Cannotfindmodule'jade~'atFunction.Module._resolveFilename(module.js:338:15)atFunction.Module._load(module.js:280:25)atModule.require(module.js:362:17)atrequire(module.js:378:17)如何解决这个问题我的索引#tabsullia(href='#tabs-1')NewLeave

javascript - Angular 翻译 : Child Module translatePartialLoader urlTemplate overrides the Parent Module translatePartialLoader urlTemplate

我必须使用多个具有不同urlTemnplate的translatePartialLoader。我正在使用angular-translate-loader-pluggable。看起来子模块urltemplate覆盖了父模块urltemplate父模块配置$translateProvider.useLoader('$translatePartialLoader',{urlTemplate:__env.hostUrl+'/*****/****/localization/resource_bundle?bundle_name={part}&locale={lang}'});$translate

javascript - 测试 angularjs Controller 时 - 找不到变量 : module/inject by chutzpah

我有angularJsControllerangular.module('App.ctrl.guests',[]).controller('guestsController',['$scope','$http','$location','$timeout','guestsService',function($scope,$http,$location,$timeout,guestsService){$scope.tiles=[];}])和Jasmine测试////////////'usestrict';describe('App.ctrl.guests',function(){vars