Created
March 7, 2016 16:21
-
-
Save tbcorr/5a7ce891ac3e4f4ad556 to your computer and use it in GitHub Desktop.
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
// underscore template in a php file that is meant to be included on the page so that it becomes an "inline template" | |
<script id="template-composite-view" type="text/template"> | |
<h1>I am a Template With Child View</h1> | |
<h2>Here they are.</h2> | |
<% if( children.length ) { %> | |
<% _.each(children, function(child){ %> | |
<div id="<%= child.cid %>" class="child-view"></div> | |
<% }); %> | |
<% } %> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment