Reputation: 2270
I've been playing with Angular yeoman generator. Very nice configuration I have to say. Everything looks great except one thing. Although in local (grunt serve) the external html templates of the directives play perfectly fine, when I make the build and run it on the server, the html templates (files) associated with directives are missing! (everything else plays perfectly fine).
for example, the template in the directive defined as
templateUrl: '../../views/usernavmenu.html',
in dev mode it's all fine, but in dist (live) the file is not concatenated and built in the js (as it is happening with the controller related views). Browser requests /views/usernavmenu.html which as such results in 404.
Expected behaviour would be for grunt tasks to build the template in the js file as it does for all other views.
Anyone with similar issue? Any ideas?
Here is the gruntfile
Upvotes: 0
Views: 139
Reputation: 2270
Solved it by changing the templateUrl
templateUrl: 'views/usernavmenu.html',
just to save time for anyone else who might be looking :)
Upvotes: 1