不知道是什么问题...
业力.conf.js
files: [
// TEMPLATES
'app/scripts/directives/views/profile_picture.html',
preprocessors : {
// generate js files from html templates
'app/scripts/directives/views/profile_picture.html': 'ng-html2js'
},
ngHtml2JsPreprocessor: {
stripPrefix: 'app/',
// setting this option will create only a single module that contains templates
// from all the files, so you can load them all with module('templates')
moduleName: 'templates'
},
然后在我使用的测试中:
beforeEach(module('templates'));
我在指令中的 templateUrl 看起来像:
templateUrl: 'scripts/directives/views/profile_picture.html',
得到
Error: Unexpected request: GET scripts/directives/views/profile_picture.html
任何想法请这可能有什么问题或建议检查什么?