Last active
December 19, 2015 23:59
-
-
Save eduardo-matos/6038650 to your computer and use it in GitHub Desktop.
Experiments DojoX DTL (Django Templating Language)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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