模板

未匹配的标注

本文档仅适用于github.com/gobuffalo/buffalo/rende...有关更多模板包的更多详细信息,请参阅github.com/gobuffalo/plush

Buffalo默认使用plush作为其模板引擎。

一般用法

// templates/index.html
<h1><%= name %>
<ul>
  <%= for (name) in names { %>
    <li><%= name %>
  <% } %>
</ul>

if else用法

<%= if (true) { %>
  <!-- render this -->
<% } %>
<%= if (false) { %>
  <!-- won't render this -->
<% } else { %>
  <!-- render this -->
<% } %>

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
superwen
讨论数量: 0
发起讨论 只看当前版本


暂无话题~