ここに私のテストファイルがあります:
describe('Clinical App', function() {
var template, element;
beforeEach(module('clinicalApp'));
describe('clinicalHeader', function() {
beforeEach(module('app/views/header.html'));
beforeEach(inject(function($templateCache, $compile, $rootScope) {
template = $templateCache.get('app/views/header.html');
$templateCache.put('views/header.html', template);
var directive = angular.element('<clinical-header></clinical-header>');
element = $compile(directive)($rootScope);
$rootScope.$digest();
}));
it('should have a list of links', function() {
var links = element.find('a');
expect(links.length).toBe(4);
});
});
});
エラーが発生し続けError: [$compile:multidir] Multiple directives [clinicalHeader, clinicalHeader] asking for template on:
ます。何かを2回ロードしている場所がわかりません。誰か見てくれませんか?