Я использую Angular-fullstack в качестве генератора. Я создал маршрут, называемый видео. Но когда я запускаю тест чернового: клиент я показал мне эту ошибку -Модуль «видео» не доступен
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
Тест код генерируется угловым-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