Reputation: 120
I have recently seen one HTML page.The code is embed with curly braces.Values for tags and loops are closed by curly braces.
{% if authenticated %}
<h1>Current User</h1>
<p>{{user}}</p>
{% else %}
<h1>Current User</h1>
<p>None</p>
{% endif %}
What is the actaul use of these type of code?
Is HTML embedded with any other language?
Upvotes: 1
Views: 8895
Reputation: 1824
This looks like the HTML is enriched with underscore.js or a similar templating engine.
It's used for displaying JavaScript data in your HTML without the need to know how JavaScript works.
Upvotes: 1