Skip to content

Instantly share code, notes, and snippets.

@eduardo-matos
Last active December 19, 2015 23:59
Show Gist options
  • Save eduardo-matos/6038650 to your computer and use it in GitHub Desktop.
Save eduardo-matos/6038650 to your computer and use it in GitHub Desktop.
Experiments DojoX DTL (Django Templating Language)
require([
'dojox/dtl',
'dojox/dtl/Context',
'dojox/dtl/filter/strings'
], function (dtl) {
var tplString = 'Hello {{ name|title }}! ' +
'seu nome tem {{ name|wordCount }} palavras!'
var tpl = new dtl.Template(tplString);
var ctx = new dtl.Context({
name: 'eduardo de matos silva'
});
console.log(tpl.render(ctx));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment