grepper add code answer
ngFor filter products based on categories
*ngFor="let item of filteredvalues" at html
at TS
//filter products by category id
this.apiService.getList().subscribe(response => {
this.productsData = response;
this.filteredvalues = this.productsData.filter(res =>
res.category_id == this.id);
console.log('get all products', this.filteredvalues);
});