maj list rate

This commit is contained in:
Julian Tomczyk 2022-01-10 22:14:54 +01:00
parent 87824c5824
commit b97670ee9f
1 changed files with 3 additions and 2 deletions

View File

@ -67,13 +67,14 @@ export class PageAccueilComponent implements OnInit {
onRatingFilter(stateNumber: number): void {
console.log(stateNumber);
this.listRate = [];
this.listData.forEach(product => {
if(product.product_rating >= stateNumber) {
this.listRate.push(product);
}
});
this.listData = this.listRate;
console.log(this.listData);
//this.listData = this.listRate;
console.log(this.listRate);
}
}