Meteor Blaze中具有多个块的动态模板内容

时间:2017-11-17 16:35:23

标签: html meteor meteor-blaze templating

我了解如何将内容块传递给模板。

<template name="myTemplate">
  <div class="container">
    {{> Template.contentBlock }}
  </div>
</template>

{{#myTemplate}}
  <h1> Hey </h1>
{{/myTemplate}}

<!-- results in -->

<div class="container>
  <h1> Hey </h1>
</div>

如果我希望能够指定多个内容块,该怎么办?类似的东西:

<template name="myTemplate">
  <h1>
    {{> Template.contentBlock_1 }}
  </h1>

  <div class="container">
    {{> Template.contentBlock_2 }}
  </div>

  <div class="footer">
    {{> Template.contentBlock_3 }}
  </div>
</template>

而他们我不确定如何调用该模板,以便传递多个内容块。

如何使用Meteor Blaze实现此类行为?

0 个答案:

没有答案