パーシャルとは
レンプレート内から更に読み込んで使われる、テンプレート内の小さな部品を”パーシャル”と呼びます。
node.jsのテンプレートはejsなどがあります。
パーシャルの例
<tr>
<th><%= key %></th><td><%= val %></td>
</tr>
これはテーブル内の一部の例で
これをテンプレートで読み込んで使います。
パーシャルの使い方
テンプレート内で下のように書いて読み込みます。
<%- incluede('パーシャルのファイル名',{受け渡す値}) %>
実際の例
<%- incluede('data_item',{key:key, val:data[key]) %>