Add these two lines to the head of a new HTML page.
Let's jump right into the simplest possible example...
The fx-fore
element creates a scope for everything being embedded inside it, similar to
a HTML form
element.
Besides the fx-fore
element we have a fx-output
here
which - well - outputs a referenced data node.
Note the ref
attribute. ref
stands for 'reference' and is a pointer
to some data node.
Fore separates data, UI and logic. Data-related elements live inside of a fx-model
element.
When the page is loaded the Fore element will start initialization. If it does not find a fx-model
one will get generated with a default instance. The fx-instance
is a constainer element for data.
Fore will look for elements having a ref
and create data nodes using the value of the
reference as name for the property and its content as value.
This is what is auto-generated for you:
References can nested and Fore will create the respective hierarchy.
The resulting data structure