Hello,
I'm beginning a web prototype and I d'like to use a template engine like nunjucks.
I manage to render some piece of template inside a section's code this way:
load section#browse': function(event) {
var items = [{ title: "foo", id: 1 }, { title: "bar", id: 2}];
var res = nunjucks.render('test.html', { tree: items });
Lungo.dom("#placeholder").html(res);
}
But I don't want to replace an element's inner html, I would prefer to have a template for the html file containing the section. But I don't know how to do it. I tried to replace the section's inner html, but then I got a black view.
I could not find any help about that in the documentation or on the web.
Hello, I'm beginning a web prototype and I d'like to use a template engine like nunjucks. I manage to render some piece of template inside a section's code this way:
But I don't want to replace an element's inner html, I would prefer to have a template for the html file containing the section. But I don't know how to do it. I tried to replace the section's inner html, but then I got a black view.
I could not find any help about that in the documentation or on the web.
Thanks for any help, Julien.