Using Angular.js and Uglify in Rails?

Posted on

If your models use Angular dependency magic, like:

function HelloController($scope, $http) {
  // ...
}

Don’t forget to add:

config.assets.js_compressor = Uglifier.new(mangle: false) if defined? Uglifier

Or explicitly use HelloController.$inject = ['$scope', '$http'].

Leave a Reply

Your email address will not be published.