I have a problem working with dot when I have template like this
{{=it.data[0].visitors}}
so this doesn't work
var data = [{
visitors: 10
}];
var tempFn = doT.template("<h1>Here is a sample template {{=it.data[0].visitors}}</h1>");
var resultText = tempFn(data[0]);
You need to name what you insert as template vars :
http://jsfiddle.net/0ds9rfk1/
or