Files
manyfold/app/javascript/controllers/hello_controller.ts
T
2021-03-19 11:44:10 +00:00

19 lines
451 B
TypeScript

// Visit The Stimulus Handbook for more details
// https://stimulusjs.org/handbook/introduction
//
// This example controller works with specially annotated HTML like:
//
// <div data-controller="hello">
// <h1 data-target="hello.output"></h1>
// </div>
import { Controller } from 'stimulus'
export default class extends Controller {
static targets = ['output']
connect (): void {
this.outputTarget.textContent = 'Hello, Stimulus!'
}
}