6 changed files with 1430 additions and 1374 deletions
@ -1,7 +0,0 @@ |
|||||||
import { Controller } from "@hotwired/stimulus" |
|
||||||
|
|
||||||
export default class extends Controller { |
|
||||||
connect() { |
|
||||||
this.element.textContent = "Hello World!" |
|
||||||
} |
|
||||||
} |
|
@ -1,7 +1,9 @@ |
|||||||
// This file is auto-generated by ./bin/rails stimulus:manifest:update
|
// Load all the controllers within this directory and all subdirectories.
|
||||||
// Run that command whenever you add a new controller
|
// Controller files must be named *_controller.js.
|
||||||
|
|
||||||
import { application } from "./application" |
import { Application } from "@hotwired/stimulus" |
||||||
|
import { definitionsFromContext } from "@hotwired/stimulus-webpack-helpers" |
||||||
|
|
||||||
import HelloController from "./hello_controller" |
const application = Application.start() |
||||||
application.register("hello", HelloController) |
const context = require.context("controllers", true, /_controller\.js$/) |
||||||
|
application.load(definitionsFromContext(context)) |
||||||
|
Loading…
Reference in new issue