The following filter make an ng-repeat only show pano
s with isOutRoom
true
:
<tr ng-if="building.pano.length" ng-repeat="pano in panos | filter: filterByRoom">
$scope.filterByRoom = function(pano, room) {
return pano.isOutRoom === true
}
I also want to do have another ng-repeat that only shows pano
s with isVirtualRoom
set to true
.
How to add a second argument to the filter so I can choose between isOutRoom
and isVirtualRoom
?
I tried this:
<tr ng-if="building.pano.length" ng-repeat="pano in panos | filter: filterByRoom: pano.isOutRoom)"
$scope.filterByRoom = function(pano, room) {
return pano.room === true
But now nothing shows in the ng-repeat.