【问题标题】:Difference between `template` and `layout` properties of Ember Component?Ember 组件的“模板”和“布局”属性之间的区别?
【发布时间】:2015-08-04 05:36:06
【问题描述】:

API doc 说:

不推荐使用指定组件的 templateName 提供 layoutlayoutName 属性。

那么组件的templatelayout有什么区别呢?在什么情况下我们需要同时指定 templatelayout

看起来 template 是布局的 {{yield}} 部分?

【问题讨论】:

    标签: ember.js ember-components


    【解决方案1】:

    您提供的链接不包含标记的文本 - 它可能已更改,因此不确定上下文是什么。但本质上,布局将用作另一个模板的“yield”部分。 (一个模板可以使用多个布局页面)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-31
      • 2013-03-29
      • 2011-06-22
      • 2012-08-27
      • 2011-02-02
      • 1970-01-01
      • 1970-01-01
      • 2012-07-21
      相关资源
      最近更新 更多