How to add a custom stimulus controller #962
Replies: 1 comment
-
Hmm, I now see what you mean. I haven't mentioned that you'd need to add your own custom asset pipeline to get the JS code loaded. The gist is that you'll have to use your own custom asset pipeline to load the JS code to the browser. If you use sprockets on the front office of your app, you'll be able to use that. Same for Webpacker. Please follow the short instructions here to add JS code to your app. Please let me know if there's something I missed while your try this solution. I'll update the docs with what I wrote above. |
Beta Was this translation helpful? Give feedback.
-
I'd like to use a custom stimulus controller, but although I've read the instructions here, it seems that my custom controller (in
app/javascripts/controllers
) isn't being loaded by avo. I had assumed that if I added the name of my custom controller toself.stimulus_controllers
in my resource class, it would be loaded. Could you please explain how to get avo to load my custom controller?Beta Was this translation helpful? Give feedback.
All reactions