File: tests/5.html

Recommend this page to a friend!
  Classes of Aliaksandr Astashenkau  >  Templ  >  tests/5.html  >  Download  
File: tests/5.html
Role: Example script
Content type: text/plain
Description: If-statement, false-branch but without else-part
Class: Templ
Processes templates embedded in the pages
Author: By
Last change:
Date: 9 years ago
Size: 760 bytes


Class file image Download
<html lang="en">
	<title>Templ test</title>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="style.css">
	<script type="text/javascript" src="utils.js"></script>
	<script type="text/javascript" src="../templ.js"></script>

	If-statement, false-branch but without else-part
	<a href="index.html" class="back">Back to tests</a>

<script type="html/template" id="tpl_example">
    <h1>{{ title }}</h1>
    {% if 5 > 10 %}
    <b>Inside true-branch</b>
    {% endif %}

<pre id="template"></pre>

<pre id="data">
        title: 'Without else-part'

<h3>Parsed result</h3>
<pre id="output"></pre>