"E" is for "embedded." EJS is a simple templating language that lets you generate HTML markup with plain JavaScript. No religiousness about how to organize things. No reinvention of iteration and control-flow. It's just plain JavaScript.
Embedded JavaScript (EJS) is a set of two open source libraries providing in-browser client side templates for web development and as a template system for node.js (including client-side template functionality). EJS uses <% %>
or [% %]
tags, executing any JavaScript within the tags. Adding an equals sign (<%= %>
) causes the enclosed JavaScript to be evaluated, and the toString representation to be appended to the document.
The original client-side EJS has been subsumed into JavaScriptMVC, official support is offered at their forum (the old Google Groups group is no longer active).
Install via npm: npm install ejs
.
References: