Ionic grid of cards for tablets


#1

Hi all!

In my application there is a list of cards. I would like that when the app runs on larger devices (tablets) the list becomes a list of two or four elements for each row.

Is it possible?


#2

I think you can accomplish it with couple of ways, first is using grid here are details:

and second you can use Platform within your component

import {Platform} from 'ionic-angular'
constructor(private platform: Platform){}

and in your view you can

<div *ngIf="platform.is('tablet')">
// show here to tablets only
</div>

a full list can be found here http://ionicframework.com/docs/api/platform/Platform/


#3

Solved by working with the grid system using breakpoints.

Here (in the comments) the solution for my problem:
http://blog.ionic.io/build-awesome-desktop-apps-with-ionics-new-responsive-grid/