How to integrate another javascript library into Volt structure?

I cannot figure out how to integrate existing JavaScript libraries into Volt. With Volt 0.9.3, the Opal Native object is not available, and using only backward steps with interpolation seems unimportant.

+4
source share
1 answer

You should be able to use native, if you want, in Volt. Controllers are currently mostly loaded on the client side, but they are required on the server side for several reasons, so you need to do:

if RUBY_PLATFORM == 'opal'
  require 'native'
end

Also, have you seen these documents? http://docs.voltframework.com/en/getting_help/can_i_use_jquery_or_other_dom_manipulating_js.html

+5
source

All Articles