Live Template v0.0.6 alpha
Tiny ( less than 10Kb gzipped ) Reactive Templating Engine for JS (ES6)
- Declarative bindings (html attributes & placeholders)
- Reactive GUI ( Automatic UI refresh when the data models changes)
- Templating system
- MVVM capabilities
- No dependencies
Usage example
View :
Name: Your name is : {{myModel.name}}
Model:
let myModel = 'myModel' name: '' ; Template
Reactive
The two way data binding automatically performed in the models,when declared, allows automatic updates in the DOM in real time.
Any change in the DOM, will be reflected also, to the model(s), when necessary.
Available Directives
lt-for-*
{{myIndex}} - {{item.name}}
Performs iteration to the provided model iterable, and renders the contents of the block as many times as iterations can be eprformed. The usage of the :index
directive modifier, allows to use an index key.
lt-if
If you see this is because myModel.visible=true
Shows/hides the element if the model prooerty evaluates to true/false
lt-on-*
Click me to trigger an action!
Adds an event listener to the element with the provided callback.
lt-value
Performs a (two way) data binding with the provded model prooerty