Created
April 2, 2012 21:33
-
-
Save karolk/2287378 to your computer and use it in GitHub Desktop.
moustache.js template example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>{{header}}</h1> | |
{{#bug}} | |
{{/bug}} | |
{{#items}} | |
{{#first}} | |
<li><strong>{{name}}</strong></li> | |
{{/first}} | |
{{#link}} | |
<li><a href="{{url}}">{{name}}</a></li> | |
{{/link}} | |
{{/items}} | |
{{#empty}} | |
<p>The list is empty.</p> | |
{{/empty}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"header": "Colors", | |
"items": [ | |
{"name": "red", "first": true, "url": "#Red"}, | |
{"name": "green", "link": true, "url": "#Green"}, | |
{"name": "blue", "link": true, "url": "#Blue"} | |
], | |
"empty": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment