我在下面给出的
HTML中使用ngOptions指令:
<select ng-model="selectedGroupToShow.Id" ng-options="g.Id as g.Name for g in myGroups"> <option value>-- All --</option> </select>
我在ng-repeat中使用的过滤器显示我的数据是这样的:@H_403_4@
filter:{GroupId:selectedGroupToShow.Id}"
即使我使用@H_403_4@
filter:selectedGroupToShow
问题保持不变.重置过滤器..@H_403_4@
这非常有效,但是当我想清除过滤器时(选择默认选项 – “全部”),它只会显示根本没有设置GroupId参数的数据.@H_403_4@