Last active
October 28, 2020 17:33
-
-
Save serge-hulne/51f6fc92c4d93f381de9a4dc51837d1f to your computer and use it in GitHub Desktop.
Form element binding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Input } from "axino/input"; | |
| import { Label } from "axino/label"; | |
| import { Div } from "axino/div"; | |
| import { eventsKeyBoard } from "axino/constants"; | |
| // Create a basic Div: | |
| var d = new Div(null); | |
| d.vertical(); | |
| d.appendToApp(); | |
| // Add a label to the Div: | |
| var l = new Label(">"); | |
| l.appendTo(d); | |
| // Add a line input: | |
| var i = new Input("test"); | |
| i.appendTo(d); | |
| i.onEvent(eventsKeyBoard.keyup, ()=> { | |
| l.setText(i.getText()); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment