【发布时间】:2014-05-09 07:36:21
【问题描述】:
是否可以使用 Ember.js/Handlebars 将内容插入到命名块中?
Rails 提供了一个 content_for 方法,它完全符合我的要求:http://guides.rubyonrails.org/layouts_and_rendering.html#using-the-content-for-method
应用程序把手模板如下所示:
{{#if isSignedIn}}
<header>
[ ... ]
The content inside the header is different from page to page.
The client wants buttons inside the header, that each have different actions.
</header>
{{/if}}
<section id="outer-content-container">
{{outlet}}
</section>
使用 Ember.js/Handlebars 完成此任务的最佳方法是什么?
【问题讨论】: