i'm trying to work with Rails 4 and Angular, and something is really bothering me.
As some of you might know, AngularJS is based on dynamically loading HTML templates (i cannot use a templateCache).
So here is a snippet of my app.js.coffee.erb (i renamed it to this, so i can use asset_path which is supposed to append the fingerprint hash of any compiled asset once it's pushed in production, right?):
# At the beginning of the file, i have put this (i have tried any combination with //=, #=, #//= or //#=... they all work. Which one am i supposed to use within a .js.coffee.erb file?): //= depend_on_asset "users/users.html" //#= depend_on_asset "users/users.html" #= depend_on_asset "users/users.html"
# This is supposed to generate the right fingerprint for an asset, right? templateUrl: '<%= asset_path '/assets/users/users.html' %>'
Rails.application.assets.register_mime_type 'text/html', '.html' Rails.application.assets.register_engine '.haml', Tilt::HamlTemplate Rails.application.assets.register_engine '.slim', Slim::Template Rails.application.config.assets.precompile += [ # Templates. 'users/users.html' ]