0
我是新来的angularJs。我遇到了一个问题,我需要通过查找数组中的元素来过滤数组(在ng-repeat中)。如何通过在angularJs中查找数组中的元素来过滤数组?
<div class="row" ng-repeat="(class_list_key, class_list) in trialList | filter: {class_id:selected_class_option_arr}">
我试过上面的代码(这是错误的)。这里selected_class_option_arr
是一个数组,其中有数值,我需要使用class_id
来过滤trialList
数组。
阵列selected_class_option_arr
是这样的 -
["Sat_09:00_AM_10:30_AM", "Fri_10:00_AM_11:00_AM"]
我试图找到,但没有得到适当的例子按我的要求。
谢谢@ Dev-One,工作得很好 –