Home
Run

Demo: Using ${} or {{html}} to render data values or expressions


TitleSynopsis

Data:

var movies = [
	{
		Title: "Eyes Wide Shut",
		Synopsis: "Director <span class='red'>Stanley Kubrick's</span> final film:<img src='...'/>"
	}
];

HTML:

<script id="movieTemplate" type="text/x-jquery-tmpl">
	<tr>
		<td>${Title}</td>
		<td class="synopsis">{{html Synopsis}}</td>
	</tr>
</script>