AngularJS app JavaScript keyed by app name thing
/code/railsapp/app/assets/javascripts/thing/
AngularJS app templates keyed by app name thing
/code/railsapp/app/assets/templates/thing/
Shared AngularJS modules
/code/railsapp/lib/assets/javascripts/angular/
I don't quite understand what the purpose of the keying with appName is. Do you have multiple AngularJS apps inside one Rails app, and they're being served templates from different paths, so you only want to load the templates from the relevant path? For myself I just removed the
when
clause on line 34 because I've only got one AngularJS app, but I'm curious how your Rails app is structured and what benefits this provides. Thanks for writing this up though, it's really helpful! Thus far it seems to be the only good way I've found of deploying HAML based templates for an AngularJS app inside a Rails app.