Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use template engine #344

Open
ju2pom opened this issue Nov 15, 2014 · 0 comments
Open

How to use template engine #344

ju2pom opened this issue Nov 15, 2014 · 0 comments

Comments

@ju2pom
Copy link

ju2pom commented Nov 15, 2014

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.

Thanks for any help,
Julien.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant