I am using Grails 2.4.1 and the Grails Asset Pipeline Plugin version 1.9.7.
I have a javascript file (it defines an AngularJS directive) which needs to reference a static HTML file (which will be used as the template for the AngularJS Directive).
How do i reference the HTML file within the asset directory?
Project Structure:
- grails-app
- assets
- javascripts
- directives
- hierarchyviewer.js
- hierarchyviewer.html
- directives
- javascripts
Project Structure when using the Angular Template Asset pipeline grails plugin
- grails-app
- assets
- javascripts
- directives
- hierarchyviewer.js
- directives
- templates
- hierarchyviewer.tpl.html
- javascripts
- assets
directivea.js contains:
angular.module('HierarchyViewer', []).directive('hierarchyviewer',function(){
return {
restrict: 'EA',
scope: {},
replace: true,
controller: function ($scope, $http) {
},
templateUrl: 'hierarchyviewer.tpl.html'
}
})
However; when I try to load a page that references the directive, I get a 404 for the directives/directivea.html reference.
How do I reference the template properly when using the Asset Pipeline plugin?