Answers for "stimulus data action"

0

stimulus data action

<div data-controller="gallery">
  <button data-action="click->gallery#next">…</button>
</div>
// controllers/gallery_controller.js
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  next(event) {
    // …
  }
}
Posted by: Guest on April-14-2022

Code answers related to "stimulus data action"

Browse Popular Code Answers by Language