Load stimulus controllers properly

This commit is contained in:
Jan Böhmer 2022-03-04 20:59:08 +01:00
parent 5cc5c53853
commit f60ef33736
4 changed files with 18 additions and 41 deletions

View file

@ -1,16 +0,0 @@
import { Controller } from 'stimulus';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
}
}