0
私はジェネレータとしてAngular-fullstackを使用しています。私はビデオと呼ばれるルートを生成しました。しかし、私が不平のテストを実行すると、クライアントは私にこのエラーを表示します -モジュール 'video'は利用できません
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
テストコードは、角型のフルスタックによって生成されます。ここ
'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
は 'ビデオに働いて両方働いた。私はもう1つをチェックさせてください。 – recharDS