automatonic/grunt-hogan — pull request #15 by dave-elkan (2013-02-24 18:12:12+00:00)
Title: Here's a binder which can reference any other template as a partial.

This binder allows a template to call any other template as a partial.

**item.hogan**

{{name}}

**items.hogan**

{{#items}}
{{>item}}
{{/items}}

It's return value is slightly different (which you may want to change) in that it does not return the Hogan object, rather just a simple javascript function which can be called directly.

define(["templates"], function(templates) {
var html = template.items({
items: [{
name: "item 1"
}, {
name: "item 2"
}]
});
});

... which will produce

item 1

item 2