0
如何创建角度使用多个复选框的服务器端过滤,当我点击应用过滤器数据应根据输入字段选中过滤,并单击清除过滤器应该被删除,所有应该显示数据。这里是JSON有多个复选框的角JS服务器端数据过滤器
{
\t items:[
\t {itemName:"apple",itemCategory:"fruits",itemStatus:"available",shipping:"nonshippable"},
\t {itemName:"mobile",itemCategory:"electronics",itemStatus:"notavailable",shipping:"shippable"},
\t {itemName:"camera",itemCategory:"gadgets",itemStatus:"available",shipping:"shippable"},
\t {itemName:"laptop",itemCategory:"computers",itemStatus:"notavailable",shipping:"shippable"},
\t {itemName:"jeans",itemCategory:"clothes",itemStatus:"available",shipping:"shippable"},
\t {itemName:"nike",itemCategory:"shoes",itemStatus:"available",shipping:"shippable"},
\t ],
\t filters:[
\t {label:"apple"},
\t {label:"laptop"},
\t {label:"jeans"},
\t {label:"nike"},
\t {label:"camera"}
\t ]
}
正如你看到的我的过滤JSON和项目都处于同一个JSON文件。
我认为最好的排序在客户端的这个数据,如果你想将它从服务器上创建一个API进行排序,并通过过滤器,它与显示过滤的数据 –
我如何通过检查输入字段的值在请求中,我已经有API了。 – sampathsuny