templateURL을 사용하여 unit test 지시문에 몇 가지 문제가 있습니다. 나는 karma-ng-html2js-preprocessor를 사용하고 있으며 그것에 관한 여러 지침을 읽었습니다. preproccsors, stripprefix 등을 추가했습니다. 여러 번 지나쳐서 잘못해서는 안됩니다.templateUrl을 사용한 각도 지시문 테스트, 모듈 인스턴스화 실패
beforeEach(module('template/input-with-units/input-with-units.html'));
내가 오류 내가 테스트가 실행할 때 :
Failed to instantiate module template/input-with-units/input-with-units.html
나는 몇 가지 모든 경로를 확인했지만 몇 가지 가이드에 작성된
내 테스트에서 내가이 줄을 추가 타임스. 잘못된 건 없다. 이것을 디버그하는 영리한 방법이 있습니까?
'module()'함수는'templateUrl'이 아닌 정의 된 모듈 **의 이름 만 허용한다는 것을 알고 있습니다. 당신이 읽고있는 가이드가 무엇이든간에 그것은 틀 렸습니다. – ryeballar
@ryeballar karma-ng-html2js-preprocessor는 html 파일을 js 문자열로 변환하고 각도 모듈을 생성합니다. – Per