@domodel/form
v0.0.15
Published
Form system for domodel
Downloads
20
Readme
domodel-form
Form system for domodel.
Getting started
Installing
npm install @domodel/form
Usage
import { Core, Observable, Binding } from "domodel"
import { FormModel, FormBinding, Form } from "@domodel/form"
import MyFormModel from "./form.js"
export default class extends Binding {
onCreated() {
const form = new Form()
this.listen(form, "submitted", data => {
console.log(`Your name is: ${data.name}`)
})
Core.run(FormModel(MyFormModel), { binding: new FormBinding({ form }) })
}
}