Adding product categories

Product categories allow us to filter the products based on certain criteria, such as books, clothing, and so on. Hierarchies are another important feature to be added so that we can group the categories into sub-categories. For example, within the book category, we can have multiple sub-categories like non-fiction, novels, self-help, and so on.

Adding the sidebar

We are now going to add a new sidebar to the marketplace that shows all the products. This sidebar will list all the products categories in the product-list page:

/* client/app/products/templates/product-list.html *excerpt */

<navbar></navbar>

<div class="container">
  <div class="row">
 <div class="col-md-3" ng-include="'components/sidebar/sidebar.html'"></div> ...

Get Web Application Development with MEAN now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.