diff --git a/assets/controllers/hello_controller.js b/assets/controllers/hello_controller.js index 621a116..041f2e5 100644 --- a/assets/controllers/hello_controller.js +++ b/assets/controllers/hello_controller.js @@ -1,7 +1,7 @@ import {Controller} from '@hotwired/stimulus'; export default class extends Controller { - static targets = ["name", "greating", "dialog", "form"] + static targets = ["name", "greeting", "dialog", "form"] connect() { console.log("Hello, Stimulus!", this.element) @@ -13,12 +13,12 @@ export default class extends Controller { return } - this.greatingTarget.innerHTML = `Hello, ${this.nameTarget.value}!` + this.greetingTarget.innerHTML = `Hello, ${this.nameTarget.value}!` this.dialogTarget.showModal() } reset() { this.nameTarget.value = '' - this.greatingTarget.innerHTML = '' + this.greetingTarget.innerHTML = '' } } diff --git a/assets/js/stimulus.js b/assets/js/stimulus.js index 0a5dc9f..691d59f 100644 --- a/assets/js/stimulus.js +++ b/assets/js/stimulus.js @@ -5,7 +5,7 @@ window.Stimulus = Application.start() Stimulus.debug = false Stimulus.register("hello", class extends Controller { - static targets = ["name", "greating", "dialog", "form"] + static targets = ["name", "greeting", "dialog", "form"] connect() { console.log("Hello, Stimulus!", this.element) @@ -16,13 +16,13 @@ Stimulus.register("hello", class extends Controller { return } - this.greatingTarget.innerHTML = `Hello, ${this.nameTarget.value}!` + this.greetingTarget.innerHTML = `Hello, ${this.nameTarget.value}!` this.dialogTarget.showModal() } reset() { this.nameTarget.value = '' - this.greatingTarget.innerHTML = '' + this.greetingTarget.innerHTML = '' } }) diff --git a/templates/stimulus.html.twig b/templates/stimulus.html.twig index 7152d92..8b09545 100644 --- a/templates/stimulus.html.twig +++ b/templates/stimulus.html.twig @@ -35,16 +35,16 @@
-