I am applying filter based on whether a record is active or not. There are basically three things 1)show all record 2)show active ones 3)show only those which are inactive
I can easily apply filtering for active or inactive using following code
<div ng-repeat="payhead in payHeadsList | filter:search">
<div style="float:left;width:65%" class="">
<span style="float:left;" class="BodyTxt3 ML1">Show</span>
<select
class="W2_Normal BodyTxt3 V4 ML1" style='float:left' id="selectPayHead"
ng-model="search.ph_active"
ng-options="a.value as a.name for a in payHeadOption"></select>
</span>
</div>
$scope.payHeadOption=[{name:"All Payhead",value:3},{name:"Active Payhead",value:1},{name:"Inactive Payhead",value:0}];
so on selecting Active Payhead/Inactive Payhead ,it filters out record with search.ph_active=0 or 1. But I need to show all records on selection of All Payhead. What is the way here?
{name:"All Payhead",value:null}do the trick?value:''