Bootstrap And Stimulus Example
Bootstrap uses jQuery's
trigger method for proving callbacks for events, unfortunately this mean Stimulus can't listen for them using
This demos a solution that allows for the events to be listened to by a Stimulus controller.
- config/webpack/environment.js - A tweak to the environment.js is required to make
- app/views/welcome/index.html.erb - The HTML sample
Setting up locally
Pull down the repo & run:
bin/setup- runs bundler & yarn, then sets up the database.
Next you should be able to run:
To turn on the server, your port may vary but if you visit http://localhost:3000/ you should be able to see the modal with a counter that updates every time it's opened.