Created
July 10, 2012 17:28
-
-
Save jhubert/3084891 to your computer and use it in GitHub Desktop.
Mustache vs Handlebars
This file contains hidden or 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
| data = { people: [{ name: 'jeremy' }], notTrue: false, label: 'People' } | |
This file contains hidden or 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
| {{#if label}}<h1>{{label}}</h1>{{/if}} | |
| <ul> | |
| {{#each people}}<li>{{name}}</li>{{/each}} | |
| </ul> | |
| {{#unless notTrue}}Yes, it's not true{{/unless}} |
This file contains hidden or 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
| {{#label}}<h1>{{label}}</h1>{{/label}} | |
| <ul> | |
| {{#people}}<li>{{name}}</li>{{/people}} | |
| </ul> | |
| {{^notTrue}}Yes, it's not true{{/notTrue}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment