Closed tarlepp closed 10 years ago
@tarlepp this has to do with the template paths being prefixed with the application name (i.e. bower.name
), see #12. So instead of having /books/books.html
and /partials/..
you should prefix those paths with your application name, e.g. /my-nice-app/books/books.html
.
If you don't want to use the application prefix in the paths you can remove the prefix
option passed to g.ngHtml2Js
in the gulpfile.
I have tried that. If I do it like this:
.state('example.books', {
url: '/books',
templateUrl: '/frontend/books/books.html',
controller: 'BooksController'
})
But that will give me always 404, from that template.
And if I remove that frontend
then my gulp serve
is working but when I run gulp dist
and try my application with that I got 404 for that template.
Hmm, that's strange. How does your ./.tmp/frontend-templates.js
look like after you've run gulp serve
? I.e. how does the generated path for books.html
look like?
You can see file contents from https://gist.github.com/tarlepp/d8a69b166569fcf9dca9
@tarlepp aha, now I see what's wrong. The module frontend-templates
needs to be included in the list of dependencies for the frontend
module. Or if you don't want that extra module you can change the moduleName
option for the ngHtml2Js
-pipe.
Did that help?
Aah! Stupid me I must say.
Now it works like it should, thanks for help! Really thanks.
@tarlepp great! No problem :)
First of all, this is a great project! And then to the point...
I'm using
ui-router
on my application and I have following structure on my application config:And my directory structure is following:
And in my gulpfile.js I have just following to get my partials to be shown:
And this just works with
gulp serve
like it should be, but if I rungulp dist
and then my owngulp production
my BooksController cannot find necessary template. That just returns me404 Not Found http://myurlhere/books/books.html
How can I solve this?