Home
Run

Demo: Using {{each}} to render repeating sections.

SynopsisTitle

Data:

var movies = [
	{
		Title: "Meet Joe Black",
		Languages: [
			{ Name: "English" },
			{ Name: "French" }
		]
	}
];

HTML:

<script id="movieTemplate" type="text/x-jquery-tmpl">
	<tr>
		<td>${Title}</td>
		<td>Languages:
			<em>
				{{each Languages}}
					${$value.Name}
				{{/each}}
			</em>
		</td>
	</tr>
</script>