I use browserify and the brfs transform [0], but I know a lot of folks don't like mixing up other module systems with angular. Your approach is probably the easiest tbh.
There might be some way to load them into $templateCache on build, but that would kill lazy loading
Re:Mistakes AngularJS Developers Make
by dougcorrea on Friday October 03, 2014 @02:08PM
(#8406757)
I use this Yeoman generator that uses a very good structure like recommended above
https://github.com/cgross/generator-cg-angular
We're using the same generator for a large government app. "Widget" partials are stashed in their respective folders under /widget while /services, /directives, and so on are contained in the root folder. HTML/CSS/JS stored in each folder. It's all super organized and modular IMO. Of course it helps to be working with the creator of said generator.
Packaging up the templates? (e.g. https://www.npmjs.org/package/grunt-angular-templates)
Re:Mistakes AngularJS Developers Make
by nuclearghost on Friday October 03, 2014 @01:44PM
(#8406605)
Yeah I think that's a fair point. It's easy enough to write a grunt or gulp task that does the copy. Not too hard to copy all the *.html files from the app directory. The time savings for development are worth it to me
It's easier instead to just dump all of them into one place and copy that folder, no need to update references etc. then.
Any ideas on how to solve this?