-category-page
-product-list
-product-page
-product-item
I am fetching all products from my service to category-page and from there I pass it to product-list and product-item. However, since product-page is not included in the templates of product-list, I have difficulty in redirecting the data clicked on it.
I change the url like this in product-item, but how can I get the information of the product clicked here?
onClickProduct(event: Event) {
this.router.navigate([
'/collections',
`${this.categoryTitle}`,
'products',
this.product.title?.toLocaleLowerCase().split(' ').join('-'),
]);
}