EJS: Embedded JavaScript Client Side Preprocessor
Written by on June 5th, 2007 in Ajax News.
As we develop richer and richer applications in the client-side logic, we inevitably run into the short-coming of HTML inside of JavaScript.
Edward Benson has created EJS, a port of Ruby’s Erb to the client side.
Example
HTML:
Usage
JAVASCRIPT:
-
-
var compiler = new EjsCompiler(ejs);
-
compiler.compile();
-
var compiled = eval(compiler.out);
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/ejs-embedded-javascript-client-side-preprocessor
