# Category: angular-filters

## ng-show working with multiple filters in ng-repeat

I have an ng-repeat list with multiple filters, but as I need the elements to be hidden and not removed from the DOM, I use ng-show for the filtering. This is how my first filter look like: <a href=”” ng-click=”myFilter = ”; toggle = toggle=0; togglesec=0; mySecondFilter = {}” ng-class=”{‘active’ : toggle==0}” > Tot </a> <a href=”” ng-click=”myFilter = ‘pa’; toggle = toggle=1; togglesec=0; mySecondFilter = {}” ng-class=”{‘active’ : toggle==1}”> Pa </a> <a href=”” ng-click=”myFilter […]

## AngularJs filter with a conditional condition

I am not sure if this is possible, but any insight would be much appreciated. I am trying to filter a duration for an album with a custom angularJs filter that is already provided for me. I want to either show hours if its available or not to show it at all if its not. I tried using something like: <span>{{ media.duration | peDateFormatFilter: ((HH > 0) ? {“HH:mm:ss”:{ “def”: “H[ hrs] mm[ mins]”}} : […]