The problem I am having is that I want to make the templateUrl: "partials/my-directive.html"
but currently I have to make it templateUrl: "app/partials/my-directive.html
in order for it to be loaded by Karma.
this is my folder structure (basically yeoman folder structure)
app
partials
my-directive.template.html
directives
my-directive.js
app.js
karma.conf.js
here is the directive code
angular.module("exampleApp")
.directive("adminMod", function () {
return {
restrict: "E",
templateUrl: "app/partials/admin-mod.html",
scope: {
props: "="
}
}
});
heres the unit test part
beforeEach(module("app/partials/admin-mod.html"));
heres the karma.conf.js
files: [
'app/bower_components/jquery/jquery.js',
'app/bower_components/angular/angular.js',
'app/partials/*.html'
],
preprocessors: {
'app/partials/*.html': 'ng-html2js'
},
ngHtml2JsPreprocessor: {
//prependPrefix: ???? what do I make this
},
I'd like to make the url relative to the app folder not my karma.conf.file I think I have exhausted every combination of paths can someone explain what and how this is supposed to work with a Yeoman angular generator file structure