Reputation: 22422
I want to code an application with Node.js where templates and rendering code out of json would be the same on client & server side.
I would have like to use jquery templates as there is a port of jquery templates to Node.js through https://github.com/kof/node-jqtpl.
Nevertheless, with this solution, the templates would be shared but not the rendering code.
Is there a templating solution where the template & rendering code would be the same ?
Thank you for your help
Jerome Wagner
Upvotes: 5
Views: 1843
Reputation: 1187
try ICanHaz.
It's really really beautiful and easy to use. you can find an introduction here.
Upvotes: 2
Reputation: 3351
https://github.com/janl/mustache.js/ Can be used on both server side and browser. Mustache is pretty awesome itself, never used it with Node.js per say, but had a go at it with Go, and it was nice. Give it a try.
Upvotes: 2