English | 简体中文
NodeTpl v4.x released

30 seconds, awareness nodetpl

Among the front-end template engine, how can nodetpl be the most elegant and perfection one?

nodetpl agreed a template is a separate module, which itself should be able to write their own css and js interaction, and will not have any conflict with the outside world, so as to do a better job separation and reuse.

Different with almost all other template engines, nodetpl promote "high cohesion", "low coupling" development model, it can carry its own css and js used anywhere and unfettered, this, other templates engine difficult can be the perfect support.

Data Modal Template Modal Render Result

Render specify template code:

nodetpl.render(code, data, function(d){
  // alert(d);

Render specify template file:

nodetpl.get(url, data, function(d){
  // alert(d);

AMD / ES6 / Node.js:

var tpl = require('path/of/tpl');
var html = tpl.render(data);
// html

Have a try

Why choose nodetpl ?