@version 18.0.0-rc.5 @date 2017-10-24
The best way to build fast and powerful web interfaces.
Weighing in at just 28KB (12KB gzipped), it includes everything you need to build a modern web application:
Build your first LiteJS app with in 5 minute Quick Start Guide
npm install -g litejs litejs init demo-project cd demo-project npm start
In short - an application consists of a presentation layer (UI) and a data layer (Model).
Most template engines translates its own custom syntax to HTML string and then let browsers to parse HTML into a DOM.
HTML is a markup language for building DOM tree from a string.
LiteJS have a DOM-aware template engine, that bypasses HTML string part and turns templates directly to DOM nodes.
Declare elements and attributes with clear, well-indented CSS selectors.
My linkItem AItem BClick
Plugins starts with
@ in template files.
#are hidden without a route.
Bindings starts with
& in template files after declaring selector.
Bindings ties together UI and Model.
To detect and respond to changes LiteJS uses observables.
Item is a observable Object,
List is a observable Array of
Defined global variables
// Optional path for views, default = ""Viewbase = "/js/views/"// Define starting point in DOM// Default viewViewmain = "home"// El.data is a root scope for elements, make View visible for templatesEldataView = View