I have successfully displayed the ng-repeat content in two columns using this code:
<div class=storerow ng-repeat="store in stores track by $index" ng-if="$index%2==0">
<div ng-repeat="i in [$index,$index+1]" ng-if="stores[i]!=null" class="ngrepeatstore">
<div class="image-container" style="background-image: url({{stores[i].image}})" ng-click="tileClicked({{stores[i].id}})">
</div>
</div>
However, when I introduce a filter, it causes the NG repeat to break and no content appears:
<div class=storerow ng-repeat="store in stores track by $index" ng-if="$index%2==0">
<div ng-repeat="i in [$index,$index+1] | filter: greaterThan('order', 0) | orderBy:'order'" ng-if="stores[i]!=null" class="ngrepeatstore">
<div class="image-container" style="background-image: url({{stores[i].image}})" ng-click="tileClicked({{stores[i].id}})">
</div>
</div>
The JavaScript function for 'greaterThan':
$scope.greaterThan = function(prop, val){
return function(item){
return item[prop] > val;
}}
I attempted adding the filter to the first ng-repeat, but it did not work as expected and applied the filter to all items. This resulted in showing all items if just one is greatThan 0, instead of filtering only the ones greater than 0.