Action View:Template:Error With Angular Strap & Rails Assets

Posted by Weston Ganger on August 20, 2014

I was getting the following error after trying to add angular-strap with rails-assets to my angular/rails application using the gem rails-assets-angular-strap


The problem arises from the minified name of the js files. Add these lines to application.js:

//= require angular-strap/angular-strap.js
//= require angular-strap/angular-strap.tpl.js

Basically rails ignores the extensions somewhat because of the added .min.js to be interpreted as .js

Its reading the file as mime type .tpl which is undesired so we used full paths to override this feature

Posted in Rails and Tagged with angularjs angular angular-strap angularstrap rails 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts