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 

Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts