const filterData: FilterData = {
filter: this.categorySlug ?
{ "category.slug": this.categorySlug } : null,
pagination: null,
select: mSelect,
sort: { createdAt: -1 },
};
<button (click)="handleClick('teaching')">Teacher</button>
handleClick(data: any) {
this.filter = {
"category.slug": data,
}
this.getAllBlog();
}
another code
const filter: FilterData = {
// filter: this.filter,
filter: { ...this.filter, quantity: { $lte: Number(10) } },
pagination: null,
select: mSelect,
sort: this.sortQuery,
};
Top comments (0)