diff --git a/src/stdlib/template.coffee b/src/stdlib/template.coffee index d4585a360..77f359c6c 100644 --- a/src/stdlib/template.coffee +++ b/src/stdlib/template.coffee @@ -17,6 +17,9 @@ class Template @build: (attributes) -> (new this).build(attributes) + @toHtml: (attributes) -> + (new this).toHtml(attributes) + build: (attributes) -> @builder = new Builder @content(attributes) @@ -28,6 +31,11 @@ class Template view.initialize?(attributes) view + toHtml: (attributes) -> + @builder = new Builder + @content(attributes) + @builder.toHtml() + wireOutlets: (view) -> view.find('[outlet]').each -> elt = $(this)