To sum up, it seems that the 'templates' module injected into angular app is not compiling those templates into templateCache, or the application.js file is ignoring all the files with .html extension.
here is my code on github: https://github.com/collapsarzhang/demo-projects/tree/master/flapper-news
The solution I found was here: http://ademartutor.azurewebsites.net/angular-rails-templates-gem-error-with-sprockets-3-0-o/
It is a
sprockets incompatibility but 2.1.3 works so use this in your Gemfile:
gem 'sprockets', '2.12.3'
(and obviously a
bundle update sprockets would be required)
It is enough by doing
as the library is looking for sprockets ~> 2
In case Rails serves a 404 error pointing to your template file, make sure to name your template different than the .js file you are using it in.
The template service needs to be able to distinguish between
my_directive.html compiled to the template cache in .js. You should name your template differently, eg.
©2020 All rights reserved.