I’m creating a webshop in angular with firebase. I don’t want to create a different component for each category. Example route: /products/tables it should list out all the tables. 2nd example: /products/chairs it should list out all the chairs. When a user clicks on a chair the route should be: /products/chairs/1234 where 1234 is the product id. Is this possibble without defining every single category as a route?
How to implement angular routing for product categories?
302 views Asked by Mirin At
2
app.routing.ts:
app.component.html:
products.components.ts:
category.component.ts:
product.component.ts:
app.module.ts:
products.service.ts: