Wrapping it up

All the changes can be found at https://github.com/amejiarosario/meanshop/compare/ch7...ch8 along with some UI styling improvements. Now let's sum up how search and navigation works.

How navigation works on the client side

This is a summary about how navigation works on the AngularJS side.

Navigation starts in sidebar.html, where we render each one of the results from Catalog.query() (see sidebar.service.js and sidebar.controller.js). Each one of the rendered catalog elements are linked to a state (ui-sref="productCatalog({slug: category.slug})").

The productCatalog (in product.js) state invokes the controller, ProductCatalogCtrl. This last one invokes the product service with the catalog action (Product.catalog). Finally, the request ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.