How to integrate other javascript library in Volt framework?

213 views Asked by At

I can't understand how to integrate existing JavaScript libraries into Volt. With Volt 0.9.3 Opal Native object isn't available and use only the backticks with interpolation seems no pratical.

1

There are 1 answers

1
Ryan On BEST 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 in on the server side for a few reasons, so you need to do:

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

Also, did you see these docs? http://docs.voltframework.com/en/getting_help/can_i_use_jquery_or_other_dom_manipulating_js.html