0
我正在使用Angular-fullstack作为生成器。我产生了一个叫做视频的路线。但是当我运行grunt测试:客户端我给我看这个错误 -模块“视频”不可用
Error: [$injector:nomod] Module 'video' 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.
http://errors.angularjs.org/1.5.3/$injector/nomod?p0=video
测试代码是由angular-fullstack生成的。这里是我的测试代码 -
'use strict';
describe('Component: VideoComponent', function() {
beforeEach(module('video'));
var VideoComponent, scope;
beforeEach(inject(function ($componentController, $rootScope) {
scope = $rootScope.$new();
VideoComponent = $componentController('VideoComponent', {
$scope: scope
});
}));
it('should ...', function() {
expect(1).to.equal(1);
});
});
这里是我的测试我的控制器代码 -
'use strict';
(function(){
class VideoComponent {
constructor() {
this.message = 'Hello';
}
}
angular.module('video')
.component('video', {
templateUrl: 'app/video/video.html',
controller: VideoComponent
});
})();
谁能告诉我什么是错在这里。提前致谢!!
它会工作,如果我更改两个组件名称'VideoComponent'? – recharDS
我这么认为。我的意思是它应该工作..... – JP1248
更改为'视频'工作。让我检查另一个。 – recharDS