How to use the jsrender.views function in jsrender

To help you get started, we’ve selected a few jsrender examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BorisMoore / jsviews.com / test / unit-tests / tests-node.js View on Github external
QUnit.test("jsrender.tags.clientTemplate", function(assert) {
	jsrender.views.settings.delimiters("<%", "%>");
	var tmpl = jsrender.compile(
		'\n'
		+ '\n'
		+ '<%clientTemplate "./test/templates/outer.html"/%>\n'
		+ '<%clientTemplate "./test/templates/inner.html"/%>\n'
		+ '\n'
		+ '<div id="result"></div>\n'
		+ '');
	var html = tmpl({name: "Jo"});
	assert.equal(html,
		'\n'
		+ '\n'
		+ '\n'
		+ '\n'
		+ '\n'
		+ '<div id="result"></div>\n'

jsrender

Best-of-breed templating in browser or on Node.js (with Express 4, Hapi and Browserify integration)

MIT
Latest version published 4 months ago

Package Health Score

70 / 100
Full package analysis