Files
openfoodnetwork/app/components/example_component/example_controller.js
Gaetan Craig-Riou ad1ce00223 Generate a better stimulus name for component controller
Using the helper `definitionsFromContext` generate quite long name for
stimulus controller in component, ie :
`tag-list-input-component--tag-list-input`.
This custom loader will generate much more readable name, ie L
`tag-list-input`. It's expecting the following pattern :
ofn_component/ofn_controller.js and will fall back to the default
of replacing "_" by "- and "/" by "--" for controller not matching
the pattern.
2025-09-10 15:03:31 +10:00

6 lines
214 B
JavaScript

// This controller will be called "example", ie "js-file-name" minus the "_controller.js"
// see controller/index.js for more info
import { Controller } from "stimulus";
export default class extends Controller {}