I have been trying out Ionic 2 along with angular 2 and its grid layout system. I'd like to be able to loop through an array of items, but because I want it to be responsive, I need to put every X items in a column and row etc, so that they can collapse if need be. In the original angular it would work like this:
<div class="row" ng-repeat="photo in photos" ng-if="$index % 4 === 0">
<div class="row">
<div class="col col-50" ng-if="$index < photos.length">
<!-- Content -->
</div>
<div class="col col-50" ng-if="$index + 1 < photos.length">
<!-- Content -->
</div>
</div>
<div class="row">
<div class="col col-50" ng-if="$index + 2 < photos.length">
<!-- Content -->
</div>
<div class="col col-50" ng-if="$index + 3 < photos.length">
<!-- Content -->
</div>
</div>
But I'm not sure how to use *ngFor and *ngIf in angular2? Could someone help with moving this over? Can;t find any examples on the web. Many thanks, David.