Hotwired wi[

This commit is contained in:
2021-09-22 16:40:20 +02:00
parent a0c72b0caf
commit 9a318249dc
21 changed files with 381 additions and 6 deletions

View File

@@ -0,0 +1,10 @@
import { Application } from "@hotwired/stimulus"
const application = Application.start()
// Configure Stimulus development experience
application.warnings = true
application.debug = false
window.Stimulus = application
export { application }

View File

@@ -0,0 +1,7 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
connect() {
this.element.textContent = "Hello World!"
}
}

View File

@@ -0,0 +1,7 @@
// This file is auto-generated by ./bin/rails stimulus:manifest:update
// Run that command whenever you add a new controller
import { application } from "./application"
import HelloController from "./hello_controller"
application.register("hello", HelloController)