2
我需要在HTML页面中列出很多项目。在合理范围内一次显示的项目太多。我曾见过与Ecto一起使用的工具来处理EEX模板中的寻呼机。但是,在我的控制器中,我从外部数据源提取这些数据,并且无法用Ecto查询它。下面的模板文件inventory.html.eex。无Ecto的EEX模板中的寻呼机 - Elixir和Phoenix
<div class="section-content">
<div class="section-row">
<div class="section-cell">
<h3> Current Inventory: </h3>
<table class="table">
<thead>
<tr>
<th>Product Title</th>
<th>Product ID</th>
</tr>
</thead>
<tbody>
<%= for product <- @products do %>
<tr>
<td><%= product["title"] %></td>
<td><%= product["id"]%></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
什么是处理这个数据的分页好的解决办法?