%@ import uri="layout.html.g.dart" %>
<%@ import uri="../models/product.dart" %>
<%@ class extends="View" %>
<%@ render params="List products, HttpRequest request" %>
Price list
<% if (products.isEmpty) { %>
No products found
<% } else { %>
Product |
Price |
<% for (final product in products) { %>
<%= product.name %>
|
<%= product.price %> |
<% } %>
<% } %>
<%
final layout = layout_html();
layout.title = 'Products';
layout.addMeta({'name': 'description', 'content': 'Price list'});
layout.addBreadcrumb('Products', SiteLinks.products);
layout.render(out, request);
%>