Setting up the category Route
Learn to set up the category route for our e-commerce application.
We'll cover the following...
We'll cover the following...
Let’s design the category route to render all the products by category using the category.hbs template. To display the products, we import the products in the app/routes/category.js file. Then, we add the return statement for the products in the model:
In line 7 of the code above, we return the products from our route handler. Next, we render these products in the category.hbs ...