1. 2
    Fire a Stimulus Controller Action on a Click Event
    1m 36s

Fire a Stimulus Controller Action on a Click Event

InstructorIan Jones

Share this video with your friends

Send Tweet

In our Stimulus App, we change the connect method to a greet action (this method name can be anything.

We then wire that action up to our HTML button by adding data-action to it and passing the function that we want to fire, in this case, its click->example#greet.