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
| // based on http://emptysquare.net/blog/adding-an-include-tag-to-underscore-js-templates/ | |
| // include tag for underscore templates | |
| // <% include template-id %> | |
| var _underscore_template = _.template; | |
| _.template = function(str, data) { | |
| // match "<% include template-id %>" | |
| return _underscore_template( | |
| str.replace( | |
| /<%\s*include\s*(.*?)\s*%>/g, |
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
| <!-- templates --> | |
| <script id="summary" type="text/x-handlebars-template"> | |
| {{#users}} | |
| {{>summaryItem}} | |
| {{/users}} | |
| </script> | |
| <script id="summaryItem" class="partial" type="text/x-handlebars-template"> | |
| <li id="user_{{id}}" class="summary_item"> | |
| <p>{{name}}</p> |
NewerOlder