lib/angular/html2js/configuration.rb in angular-html2js-0.0.2 vs lib/angular/html2js/configuration.rb in angular-html2js-0.0.3
- old
+ new
@@ -1,5 +1,8 @@
+require 'sprockets'
+require 'angular/html2js/haml'
+
module Angular
module Html2js
def self.configure
yield config
end
@@ -31,9 +34,16 @@
end
def method_missing(config_name, *)
puts "Sorry, there is no such configuration option named #{config_name}"
super
+ end
+
+ def init_sprockets
+ # hack around bug in rails assets debug mode
+ # TODO: remove this once this bug is resolved: https://github.com/sstephenson/sprockets/issues/478
+ Sprockets.register_engine '.haml', Angular::Html2js::Haml
+ Sprockets.register_engine '.ngt', Angular::Html2js::Engine
end
end
end
end