Xeauk JS

Xeauk JS is a lightweight and minimal JavaScript 5kb web templating engine

Introduction

Welcome to Xeauk JS. Xeauk JS brings the power
of JavaScript directly in your HTML.
No more writing complicated codes to bind variables to HTML.

On top of templating, Xeauk JS allows you to write
JavaScript expression directly inside the @{}
template.

Installation

We recommend using the CDN (Content Delivery Network) version.


Setting up

HTML
  1. Ensure you have added the script to xeauk.js (via CDN/ local)
  2. Add an attribute tag of xController to the body tag
  3. Set the name for xController
JavaScript
  1. Get an instance of Xeauk
  2. Set the scope of templating
  3. Define a variable
  4. Bind the variable in the HTML
  5. Compile the templating engine
Notice
If you are using x11.js remember to pass in x.compile([],{option: "@{}"}).

JavaScript expression

Write JavaScript expression directly in HTML
E.g. displaying a computation, random numbers
or even displaying the current date time in real time