ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

Remove module name from template path #92

Closed slavede closed 10 years ago

slavede commented 10 years ago

I want to create template .js file that has same path as .html.

I have standard yo angular structure of project

So I have in my directive (it's located in app/scripts/directives):

templateUrl : 'views/directives/menu.tpl'

My template is in app/views/directive/menu.tpl

When I run ngtemplates it generates following part of code:

angular.module("MyModule").run(["$templateCache",function(a){a.put("app/views/directives/menu.tpl"

you can see that it searches directive template in different place than it's defined in directive.js making it not found.

app/ should be removed from template path...

ericclemmons commented 10 years ago

Sure, you have a couple of options:

slavede commented 10 years ago

cwd made it for me..thanks!