【发布时间】:2021-11-22 02:03:50
【问题描述】:
我的 Angular 应用程序中有一个搜索框。搜索结果应该返回两个对象值,如 product_name 和 product_content。但在我的应用程序中,它只占用一个对象。但我想为 product_name 和 product_content 应用搜索选项。
filter.pipe.ts:
return products.filter((items) => {
return (
items.product_name.toLowerCase().includes(searchText), // Not working
items.product_content.toLowerCase().includes(searchText) // working
);
});
那么,如何解决这个问题?如果有人知道帮助找到解决方案。
【问题讨论】:
标签: javascript angular typescript angular8