Add index.html with Stimulus hello controller
This commit is contained in:
parent
b280d54f77
commit
d379fdb73d
9 changed files with 524 additions and 0 deletions
5
assets/js/app.js
Normal file
5
assets/js/app.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { Application } from "@hotwired/stimulus";
|
||||
import { definitions } from "stimulus:./controllers";
|
||||
|
||||
const app = Application.start();
|
||||
app.load(definitions);
|
7
assets/js/controllers/hello_controller.js
Normal file
7
assets/js/controllers/hello_controller.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { Controller } from "@hotwired/stimulus";
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
console.log("hello#connect");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue